ist.palcom.storage.pio
Class StorageOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by ist.palcom.storage.pio.StorageOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class StorageOutputStream
extends java.io.OutputStream


Constructor Summary
StorageOutputStream(Storage store, java.lang.String filen)
          Create a stream
 
Method Summary
 void close()
          Close the stream
 void write(byte[] b, int off, int len)
          Write a byte array
 void write(int b)
          Write a byte
 void writeInt(int v)
          Write an int
 
Methods inherited from class java.io.OutputStream
flush, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StorageOutputStream

public StorageOutputStream(Storage store,
                           java.lang.String filen)
                    throws java.io.IOException
Create a stream

Parameters:
store - The Storage to use
filen - The File name
Throws:
java.io.IOException
Method Detail

close

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

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.OutputStream
Throws:
java.io.IOException

write

public void write(int b)
           throws java.io.IOException
Write a byte

Specified by:
write in class java.io.OutputStream
Parameters:
b - the Byte
Throws:
java.io.IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Write a byte array

Overrides:
write in class java.io.OutputStream
Parameters:
b - the byte array
off - offset in the stream
len - lenght of the stream
Throws:
java.io.IOException

writeInt

public final void writeInt(int v)
                    throws java.io.IOException
Write an int

Parameters:
v - the int
Throws:
java.io.IOException