Package org.brotli.wrapper.enc
Class BrotliOutputStream
java.lang.Object
java.io.OutputStream
org.brotli.wrapper.enc.BrotliOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
Output stream that wraps native brotli encoder.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
The default internal buffer size used by the encoder.private final Encoder
-
Constructor Summary
ConstructorsConstructorDescriptionBrotliOutputStream
(OutputStream destination) BrotliOutputStream
(OutputStream destination, Encoder.Parameters params) BrotliOutputStream
(OutputStream destination, Encoder.Parameters params, int bufferSize) Creates a BrotliOutputStream. -
Method Summary
Modifier and TypeMethodDescriptionvoid
attachDictionary
(PreparedDictionary dictionary) void
close()
void
flush()
void
write
(byte[] b) void
write
(byte[] b, int off, int len) void
write
(int b)
-
Field Details
-
DEFAULT_BUFFER_SIZE
private static final int DEFAULT_BUFFER_SIZEThe default internal buffer size used by the encoder.- See Also:
-
encoder
-
-
Constructor Details
-
BrotliOutputStream
public BrotliOutputStream(OutputStream destination, Encoder.Parameters params, int bufferSize) throws IOException Creates a BrotliOutputStream.- Parameters:
destination
- underlying destinationparams
- encoding settingsbufferSize
- intermediate buffer size- Throws:
IOException
-
BrotliOutputStream
- Throws:
IOException
-
BrotliOutputStream
- Throws:
IOException
-
-
Method Details
-
attachDictionary
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-