Class LZWOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
com.adobe.internal.pdftoolkit.core.filter.LZWOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
LZWOutputStream
-
Constructor Summary
ConstructorsConstructorDescriptionLZWOutputStream(OutputStream out, FilterParams p) Creates an output stream filter. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the stream and writes the stream trailer.longCounts the number of bytes written by this filter.voidwrite(byte[] b) Writes an array of bytes.voidwrite(byte[] b, int off, int len) Writes a subarray of bytes.voidwrite(int b) Writes a byte.Methods inherited from class java.io.FilterOutputStream
flushMethods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
LZWOutputStream
Creates an output stream filter.- Parameters:
out- the output stream
-
LZWOutputStream
-
-
Method Details
-
write
Writes a byte. Will block until the byte is actually written.- Overrides:
writein classFilterOutputStream- Parameters:
b- the byte- Throws:
IOException- If an I/O error has occurred.
-
write
Writes a subarray of bytes.- Overrides:
writein classFilterOutputStream- Parameters:
b- the data to be writtenoff- the start offset in the datalen- the number of bytes that are written- Throws:
IOException- If an I/O error has occurred.
-
write
Writes an array of bytes. Will block until the bytes are actually written.- Overrides:
writein classFilterOutputStream- Parameters:
b- the data to be written- Throws:
IOException- If an I/O error has occurred.
-
close
Closes the stream and writes the stream trailer. This method must be called to release any resources associated with the stream.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterOutputStream- Throws:
IOException- If an I/O error has occurred.
-
getTotalOut
public long getTotalOut()Counts the number of bytes written by this filter.- Returns:
- actual number of bytes written
-