Package org.postgresql.core
Class FixedLengthOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.postgresql.core.FixedLengthOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
public class FixedLengthOutputStream extends java.io.OutputStreamA stream that refuses to write more than a maximum number of bytes.
-
-
Constructor Summary
Constructors Constructor Description FixedLengthOutputStream(int size, java.io.OutputStream target)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intremaining()private voidverifyAllowed(int wanted)voidwrite(byte[] buf, int offset, int len)voidwrite(int b)
-
-
-
Method Detail
-
write
public void write(int b) throws java.io.IOException- Specified by:
writein classjava.io.OutputStream- Throws:
java.io.IOException
-
write
public void write(byte[] buf, int offset, int len) throws java.io.IOException- Overrides:
writein classjava.io.OutputStream- Throws:
java.io.IOException
-
remaining
public int remaining()
-
verifyAllowed
private void verifyAllowed(int wanted) throws java.io.IOException- Throws:
java.io.IOException
-
-