jjdh API

dh.java.io
Class ByteBufferInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by dh.java.io.ByteBufferInputStream
All Implemented Interfaces:
Closeable

public class ByteBufferInputStream
extends InputStream

See Also:
ByteArrayInputStream

Field Summary
protected  ByteBuffer buffer
           
protected  int count
           
protected  int mark
           
protected  int pos
           
 
Constructor Summary
ByteBufferInputStream(ByteBuffer buffer)
           
 
Method Summary
 int available()
           
 void close()
           
 void mark(int readAheadLimit)
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] b, int off, int len)
           
 void reset()
           
 long skip(long n)
           
 
Methods inherited from class java.io.InputStream
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buffer

protected ByteBuffer buffer

pos

protected int pos

mark

protected int mark

count

protected int count
Constructor Detail

ByteBufferInputStream

public ByteBufferInputStream(ByteBuffer buffer)
Method Detail

read

public int read()
Specified by:
read in class InputStream

read

public int read(byte[] b,
                int off,
                int len)
Overrides:
read in class InputStream

skip

public long skip(long n)
Overrides:
skip in class InputStream

available

public int available()
Overrides:
available in class InputStream

markSupported

public boolean markSupported()
Overrides:
markSupported in class InputStream

mark

public void mark(int readAheadLimit)
Overrides:
mark in class InputStream

reset

public void reset()
Overrides:
reset in class InputStream

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class InputStream
Throws:
IOException

jjdh API

Copyright © 2006 Jonas Jacobi and Dennis Heidsiek. All Rights Reserved.