Class FixedLengthOutputStream
java.lang.Object
java.io.OutputStream
org.postgresql.core.FixedLengthOutputStream
- All Implemented Interfaces:
Closeable, Flushable, AutoCloseable
A stream that refuses to write more than a maximum number of bytes.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintprivate voidverifyAllowed(int wanted) voidwrite(byte[] buf, int offset, int len) voidwrite(int b) Methods inherited from class OutputStream
close, flush, nullOutputStream, write
-
Field Details
-
size
private final int size -
target
-
written
private int written
-
-
Constructor Details
-
FixedLengthOutputStream
-
-
Method Details
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
remaining
public int remaining() -
verifyAllowed
- Throws:
IOException
-