com.imagero.uio.io
Class RandomAccessOutputStream

java.lang.Object
  extended byjava.io.OutputStream
      extended bycom.imagero.uio.io.RandomAccessOutputStream

public class RandomAccessOutputStream
extends java.io.OutputStream

RandomAccessOutputStream.java Can be used as bridge between RandomAccessFile and OutputStream.


Field Summary
protected  long pos
           
protected  RandomAccess ra
           
 
Constructor Summary
RandomAccessOutputStream(RandomAccess ra)
           
RandomAccessOutputStream(RandomAccess ra, long startPos)
           
 
Method Summary
protected  void checkPos()
           
 void close()
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.io.OutputStream
flush
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ra

protected RandomAccess ra

pos

protected long pos
Constructor Detail

RandomAccessOutputStream

public RandomAccessOutputStream(RandomAccess ra)

RandomAccessOutputStream

public RandomAccessOutputStream(RandomAccess ra,
                                long startPos)
Method Detail

checkPos

protected void checkPos()
                 throws java.io.IOException
Throws:
java.io.IOException

write

public void write(int b)
           throws java.io.IOException
Throws:
java.io.IOException

write

public void write(byte[] b)
           throws java.io.IOException
Throws:
java.io.IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException