com.partnersoft.io.vfs
Class VfsRandomAccessOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by com.partnersoft.io.vfs.VfsRandomAccessOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class VfsRandomAccessOutputStream
extends java.io.OutputStream

A wrapper implementation of OutputStream that forwards all I/O to an enclosed VfsRandomAccess object. Useful for VfsImplementations where there are no existing OutputStream implementations and you just want to implement the VfsRandomAccess and get on with life.

Copyright 2008 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis

Constructor Summary
VfsRandomAccessOutputStream(VfsRandomAccess randy)
          Create an output stream for the given VfsRandomAccess object.
 
Method Summary
 void close()
           
 java.lang.String toString()
           
 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, wait, wait, wait
 

Constructor Detail

VfsRandomAccessOutputStream

public VfsRandomAccessOutputStream(VfsRandomAccess randy)
Create an output stream for the given VfsRandomAccess object. It will begin writing at the VfsRandomAccess' current byte position.

Method Detail

write

public void write(int b)
           throws java.io.IOException
Specified by:
write in class java.io.OutputStream
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.OutputStream
Throws:
java.io.IOException

write

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

write

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object