org.apache.fop.render.ps
Class RunLengthEncodeOutputStream

java.lang.Object
  extended byjava.io.OutputStream
      extended byjava.io.FilterOutputStream
          extended byorg.apache.fop.render.ps.RunLengthEncodeOutputStream
All Implemented Interfaces:
Finalizable

public class RunLengthEncodeOutputStream
extends java.io.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(java.io.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(java.io.OutputStream out)
Constructor for the RunLengthEncode Filter.

Parameters:
out - The OutputStream to write to
Method Detail

write

public void write(byte b)
           throws java.io.IOException
Parameters:
b - the byte.
Throws:
java.io.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 java.io.IOException
Parameters:
b - the data.
Throws:
java.io.IOException - if an I/O error occurs.
See Also:
OutputStream.write(byte[])

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Parameters:
b - the data.
off - the start offset in the data.
len - the number of bytes to write.
Throws:
java.io.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 java.io.IOException
Flushes the the stream and writes out the trailer, but, unlike close(), without closing the stream.

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

close

public void close()
           throws java.io.IOException
Closes the stream.

Throws:
java.io.IOException - if an I/O error occurs.


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