com.sun.j3d.utils.scenegraph.io.retained
Class PositionInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.sun.j3d.utils.scenegraph.io.retained.PositionInputStream
All Implemented Interfaces:
java.io.Closeable

 class PositionInputStream
extends java.io.InputStream


Field Summary
private  long pos
           
private  java.io.InputStream stream
           
 
Constructor Summary
PositionInputStream(java.io.InputStream stream)
           
 
Method Summary
 long getFilePointer()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 void seekForward(long position)
          Move the file pointer to the specified position.
 long skip(long n)
           
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pos

private long pos

stream

private java.io.InputStream stream
Constructor Detail

PositionInputStream

public PositionInputStream(java.io.InputStream stream)
Method Detail

read

public int read()
         throws java.io.IOException
Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException

read

public int read(byte[] b)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException

read

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

skip

public long skip(long n)
          throws java.io.IOException
Overrides:
skip in class java.io.InputStream
Throws:
java.io.IOException

seekForward

public void seekForward(long position)
                 throws java.io.IOException
Move the file pointer to the specified position. The position MUST be greater or equal to the current position

Throws:
java.io.IOException

getFilePointer

public long getFilePointer()


Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.