Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.imagero.uio.io
Class App13OutputStream  view App13OutputStream download App13OutputStream.java

java.lang.Object
  extended byjava.io.OutputStream
      extended byjava.io.FilterOutputStream
          extended bycom.imagero.uio.io.App13OutputStream

public class App13OutputStream
extends java.io.FilterOutputStream

Utility to write data into App13 block(s). If data is longer as given App13 size then multiple App13 blocks are written.


Field Summary
(package private)  byte[] buffer
           
(package private)  int count
           
private  byte[] header
           
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
App13OutputStream(java.io.OutputStream out)
          create new App13OutputStream with default App13 size (32000)
App13OutputStream(java.io.OutputStream out, int length)
          create App13OutputStream with user defined App13 size
 
Method Summary
 void flush()
          This method attempt to flush all buffered output to be written to the underlying output sink.
protected  void flushBuffer()
           
 void write(byte[] b)
          This method writes all the bytes in the specified array to the underlying OutputStream.
 void write(byte[] b, int off, int len)
          This method calls the write(int) method len times for all bytes from the array buf starting at index offset.
 void write(int b)
          This method writes a single byte of output to the underlying OutputStream.
 
Methods inherited from class java.io.FilterOutputStream
close
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

count

int count

buffer

byte[] buffer

header

private byte[] header
Constructor Detail

App13OutputStream

public App13OutputStream(java.io.OutputStream out)
create new App13OutputStream with default App13 size (32000)


App13OutputStream

public App13OutputStream(java.io.OutputStream out,
                         int length)
create App13OutputStream with user defined App13 size

Method Detail

write

public void write(int b)
           throws java.io.IOException
Description copied from class: java.io.FilterOutputStream
This method writes a single byte of output to the underlying OutputStream.


flushBuffer

protected void flushBuffer()
                    throws java.io.IOException

write

public void write(byte[] b)
           throws java.io.IOException
Description copied from class: java.io.FilterOutputStream
This method writes all the bytes in the specified array to the underlying OutputStream. It does this by calling the three parameter version of this method - write(byte[], int, int) in this class instead of writing to the underlying OutputStream directly. This allows most subclasses to avoid overriding this method.


write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Description copied from class: java.io.FilterOutputStream
This method calls the write(int) method len times for all bytes from the array buf starting at index offset. Subclasses should overwrite this method to get a more efficient implementation.


flush

public void flush()
           throws java.io.IOException
Description copied from class: java.io.FilterOutputStream
This method attempt to flush all buffered output to be written to the underlying output sink.