Package com.microej.http.util
Class HttpBufferedStreamFactory
- java.lang.Object
-
- com.microej.http.util.HttpBufferedStreamFactory
-
public class HttpBufferedStreamFactory extends Object
Factory class for BufferStream instantiation.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static InputStreamnewInputStream(InputStream inputStream)Generates a new BufferInputStream with the buffered size defined by "java.net.HttpURLConnection.rx.buffer.size".static OutputStreamnewOutputStream(OutputStream outputStream)Generates a new BufferOutputStream with the buffered size defined by "java.net.HttpURLConnection.tx.buffer.size".
-
-
-
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.
-
-