org.apache.fop.render.ps
Class RunLengthEncodeOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by org.apache.fop.render.ps.RunLengthEncodeOutputStream
All Implemented Interfaces:
Closeable, Flushable, Finalizable

public class RunLengthEncodeOutputStream
extends FilterOutputStream
implements Finalizable

This class applies a RunLengthEncode filter to the stream.

Version:
$Id: RunLengthEncodeOutputStream.java,v 1.1.2.2 2003/02/25 14:58:23 jeremias Exp $
Author:
Stephen Wolke

Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
RunLengthEncodeOutputStream(OutputStream out)
          Constructor for the RunLengthEncode Filter.
 
Method Summary
 void close()
          Closes the stream.
 void finalizeStream()
          Flushes the the stream and writes out the trailer, but, unlike close(), without closing the stream.
 void write(byte b)
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 
Methods inherited from class java.io.FilterOutputStream
flush, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RunLengthEncodeOutputStream

public RunLengthEncodeOutputStream(OutputStream out)
Constructor for the RunLengthEncode Filter.

Parameters:
out - The OutputStream to write to
Method Detail

write

public void write(byte b)
           throws IOException
Parameters:
b - the byte.
Throws:
IOException - if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.
See Also:
OutputStream.write(int)

write

public void write(byte[] b)
           throws IOException
Overrides:
write in class FilterOutputStream
Parameters:
b - the data.
Throws:
IOException - if an I/O error occurs.
See Also:
OutputStream.write(byte[])

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Overrides:
write in class FilterOutputStream
Parameters:
b - the data.
off - the start offset in the data.
len - the number of bytes to write.
Throws:
IOException - if an I/O error occurs. In particular, an IOException is thrown if the output stream is closed.
See Also:
OutputStream.write(byte[], int, int)

finalizeStream

public void finalizeStream()
                    throws IOException
Flushes the the stream and writes out the trailer, but, unlike close(), without closing the stream.

Specified by:
finalizeStream in interface Finalizable
Throws:
IOException - if an I/O error occurs.

close

public void close()
           throws IOException
Closes the stream.

Specified by:
close in interface Closeable
Overrides:
close in class FilterOutputStream
Throws:
IOException - if an I/O error occurs.


Copyright ? 1999-2003 Apache Software Foundation. All Rights Reserved.