Class RunLengthOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- com.adobe.internal.pdftoolkit.core.filter.RunLengthOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
public class RunLengthOutputStream extends java.io.FilterOutputStreamRunLengthOutputStream Important: This filter assumes the output stream is an ISO/Latin-1 stream, of 1-byte (not Unicode) characters! Copyright (C) 1996 Adobe Systems Incorporated
-
-
Constructor Summary
Constructors Constructor Description RunLengthOutputStream(java.io.OutputStream out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the stream and writes the stream trailer "0x80".longgetTotalOut()Counts 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.
-
-
-
Method Detail
-
write
public void write(int b) throws java.io.IOExceptionWrites a byte. Will block until the byte is actually written.- Overrides:
writein classjava.io.FilterOutputStream- Parameters:
b- the byte- Throws:
java.io.IOException- If an I/O error has occurred.
-
write
public void write(byte[] b, int off, int len) throws java.io.IOExceptionWrites a subarray of bytes.- Overrides:
writein classjava.io.FilterOutputStream- Parameters:
b- the data to be writtenoff- the start offset in the datalen- the number of bytes that are written- Throws:
java.io.IOException- If an I/O error has occurred.
-
write
public void write(byte[] b) throws java.io.IOExceptionWrites an array of bytes. Will block until the bytes are actually written.- Overrides:
writein classjava.io.FilterOutputStream- Parameters:
b- the data to be written- Throws:
java.io.IOException- If an I/O error has occurred.
-
close
public void close() throws java.io.IOExceptionCloses the stream and writes the stream trailer "0x80". This method must be called to release any resources associated with the stream.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.FilterOutputStream- Throws:
java.io.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
-
-