Servertec
Persistent Object Store
1.4.1 09/04/2005

stec.xpos
Class ObjectStoreInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by stec.xpos.ObjectStoreInputStream
All Implemented Interfaces:
java.io.Closeable

public class ObjectStoreInputStream
extends java.io.InputStream

Represents an input stream to a persistent object store value.

Since:
1.3.0 10/19/2003
See Also:
getInputStream, InputStream

Method Summary
 void close()
          Closes this input stream.
 int getType()
          Returns input stream type.
 boolean isOpen()
          Returns whether this input stream is still open.
 int length()
          Returns the size in bytes of the input stream.
 int offset()
          Returns the current offset into the input stream.
 int read()
          Reads a byte from the input stream.
 int read(byte[] buffer)
          Reads into the specified array from the input stream.
 int read(byte[] buffer, int offset, int length)
          Reads into the specified byte array from the input stream.
 long skip(long n)
          Skips over the specified number of bytes.
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, reset
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

read

public final int read()
               throws java.io.IOException
Reads a byte from the input stream.

Specified by:
read in class java.io.InputStream
Returns:
the byte read. -1 if at end of stream.
Throws:
java.io.IOException - if an I/O exception occurred.

read

public final int read(byte[] buffer,
                      int offset,
                      int length)
               throws java.io.IOException
Reads into the specified byte array from the input stream.

Overrides:
read in class java.io.InputStream
Parameters:
buffer - the buffer to read into.
offset - the starting offset into the buffer.
length - the maximum number of bytes to read.
Returns:
the number of bytes read. -1 if at end of stream.
Throws:
java.io.IOException - if an I/O exception occurred.

read

public final int read(byte[] buffer)
               throws java.io.IOException
Reads into the specified array from the input stream.

Overrides:
read in class java.io.InputStream
Parameters:
buffer - the buffer to read into.
Returns:
the number of bytes read. -1 if at end of stream.
Throws:
java.io.IOException - if an I/O exception occurred.

skip

public final long skip(long n)
                throws java.io.IOException
Skips over the specified number of bytes.

Overrides:
skip in class java.io.InputStream
Parameters:
n - the number of bytes to skip.
Returns:
the number of bytes skipped.
Throws:
java.io.IOException - if an I/O exception occurred.

getType

public final int getType()
                  throws java.io.IOException
Returns input stream type.

Returns:
input stream type.
Throws:
java.io.IOException - if an I/O exception occurred.

length

public final int length()
                 throws java.io.IOException
Returns the size in bytes of the input stream.

Returns:
the size in bytes of the input stream.
Throws:
java.io.IOException - if an I/O exception occurred.

offset

public final int offset()
                 throws java.io.IOException
Returns the current offset into the input stream.

Returns:
the current offset into the input stream.
Throws:
java.io.IOException - if an I/O exception occurred.

isOpen

public final boolean isOpen()
                     throws java.io.IOException
Returns whether this input stream is still open.

Returns:
whether this input stream is still open.
Throws:
java.io.IOException - if an I/O exception occurred.

close

public final void close()
                 throws java.io.IOException
Closes this input stream.

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.InputStream
Throws:
java.io.IOException - if this input stream is closed or if an I/O exception occurs.

Servertec
Persistent Object Store
1.4.1 09/04/2005

Copyright © 2001-2005 Servertec. All rights reserved.