Package org.postgresql.util
Class StreamWrapper
java.lang.Object
org.postgresql.util.StreamWrapper
Wrapper around a length-limited InputStream.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate static final intprivate final intprivate final byte[]private final InputStreamprivate static final String -
Constructor Summary
ConstructorsConstructorDescriptionStreamWrapper(byte[] data, int offset, int length) StreamWrapper(InputStream stream) StreamWrapper(InputStream stream, int length) -
Method Summary
Modifier and TypeMethodDescriptionprivate static intcopyStream(InputStream inputStream, OutputStream outputStream, int limit) byte[]getBytes()intinttoString()
-
Field Details
-
MAX_MEMORY_BUFFER_BYTES
private static final int MAX_MEMORY_BUFFER_BYTES- See Also:
-
TEMP_FILE_PREFIX
- See Also:
-
stream
-
rawData
private final byte[] rawData -
offset
private final int offset -
length
private final int length
-
-
Constructor Details
-
StreamWrapper
public StreamWrapper(byte[] data, int offset, int length) -
StreamWrapper
-
StreamWrapper
- Throws:
PSQLException
-
-
Method Details
-
getStream
-
getLength
public int getLength() -
getOffset
public int getOffset() -
getBytes
public byte[] getBytes() -
toString
-
copyStream
private static int copyStream(InputStream inputStream, OutputStream outputStream, int limit) throws IOException - Throws:
IOException
-