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