- Common ways to obtain StreamWrapper
private void myMethod () {StreamWrapper s =
InputStream stream;new StreamWrapper(stream, length)
new StreamWrapper(data, offset, length)
- Smart code suggestions by Codota
}
public StreamWrapper(InputStream stream) throws PSQLException { try { ByteArrayOutputStream memoryOutputStream = new ByteArrayOutputStream(); final int memoryLength = copyStream(stream, memoryOutputStream, MAX_MEMORY_BUFFER_BYTES); byte[] rawData = memoryOutputStream.toByteArray(); diskOutputStream.write(rawData); try { diskLength = copyStream(stream, diskOutputStream, Integer.MAX_VALUE - rawData.length); if (diskLength == -1) { throw new PSQLException(GT.tr("Object is too large to send over the protocol."),