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 intThe 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 TypeMethodDescriptionvoidattachDictionary(PreparedDictionary dictionary) voidclose()voidflush()voidwrite(byte[] b) voidwrite(byte[] b, int off, int len) voidwrite(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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-