Package org.zalando.fahrschein.http.api
Class StreamUtils
java.lang.Object
org.zalando.fahrschein.http.api.StreamUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default buffer size used when copying bytes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intdrain(InputStream in) Drain the remaining content of the given InputStream.
-
Field Details
-
BUFFER_SIZE
public static final int BUFFER_SIZEThe default buffer size used when copying bytes.- See Also:
-
-
Constructor Details
-
StreamUtils
public StreamUtils()
-
-
Method Details
-
drain
Drain the remaining content of the given InputStream.Leaves the InputStream open when done.
- Parameters:
in- the InputStream to drain- Returns:
- the number of bytes read
- Throws:
IOException- in case of I/O errors
-