Class HttpBufferedStreamFactory


  • public class HttpBufferedStreamFactory
    extends Object
    Factory class for BufferStream instantiation.
    • Method Detail

      • newInputStream

        public static InputStream newInputStream​(InputStream inputStream)
        Generates a new BufferInputStream with the buffered size defined by "java.net.HttpURLConnection.rx.buffer.size". The minimum buffer size is 10.
        Parameters:
        inputStream - the input stream.
        Returns:
        a BufferedInputStream with the buffer size defined by "java.net.HttpURLConnection.rx.buffer.size".
      • newOutputStream

        public static OutputStream newOutputStream​(OutputStream outputStream)
        Generates a new BufferOutputStream with the buffered size defined by "java.net.HttpURLConnection.tx.buffer.size".
        Parameters:
        outputStream - the output stream.
        Returns:
        a BufferedOutputStream with the buffer size defined by "java.net.HttpURLConnection.tx.buffer.size" if it is more than 0, outputStream otherwise.