Class FlateOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- com.adobe.internal.pdftoolkit.core.filter.FlateOutputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.AutoCloseable
public class FlateOutputStream extends java.io.FilterOutputStream
-
-
Constructor Summary
Constructors Constructor Description FlateOutputStream(java.io.OutputStream out)
FlateOutputStream(java.io.OutputStream out, FilterParams p)
Creates an output stream filter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes the stream and writes the stream trailer.long
getTotalOut()
Counts the number of bytes written by this filter.void
write(byte[] b)
Writes an array of bytes.void
write(byte[] b, int off, int len)
Writes a subarray of bytes.void
write(int b)
Writes a byte.
-
-
-
Constructor Detail
-
FlateOutputStream
public FlateOutputStream(java.io.OutputStream out, FilterParams p)
Creates an output stream filter.- Parameters:
out
- the output stream
-
FlateOutputStream
public FlateOutputStream(java.io.OutputStream out)
-
-
Method Detail
-
write
public void write(int b) throws java.io.IOException
Writes a byte. Will block until the byte is actually written.- Overrides:
write
in 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.IOException
Writes a subarray of bytes.- Overrides:
write
in 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.IOException
Writes an array of bytes. Will block until the bytes are actually written.- Overrides:
write
in 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.IOException
Closes the stream and writes the stream trailer. This method must be called to release any resources associated with the stream.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in 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
-
-