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 int
private static final int
private final int
private final byte[]
private final InputStream
private 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 int
copyStream
(InputStream inputStream, OutputStream outputStream, int limit) byte[]
getBytes()
int
int
toString()
-
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
-