org.basex.io.in
Class ArrayInput

java.lang.Object
  extended by java.io.InputStream
      extended by org.basex.io.in.BufferInput
          extended by org.basex.io.in.ArrayInput
All Implemented Interfaces:
java.io.Closeable

public final class ArrayInput
extends BufferInput

This class allows reading from a cached byte array.

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

Field Summary
 
Fields inherited from class org.basex.io.in.BufferInput
bpos, bsize, buffer, input, length
 
Constructor Summary
ArrayInput(byte[] in)
          Constructor, specifying the byte array to be read.
ArrayInput(java.lang.String in)
          Constructor, specifying the string to be read.
 
Method Summary
protected  int readByte()
          Returns the next unsigned byte.
 
Methods inherited from class org.basex.io.in.BufferInput
close, content, io, length, mark, markSupported, read, readBytes, readString, reset, size
 
Methods inherited from class java.io.InputStream
available, read, read, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayInput

public ArrayInput(byte[] in)
Constructor, specifying the byte array to be read.

Parameters:
in - input bytes

ArrayInput

public ArrayInput(java.lang.String in)
Constructor, specifying the string to be read.

Parameters:
in - input bytes
Method Detail

readByte

protected int readByte()
Description copied from class: BufferInput
Returns the next unsigned byte. -1 is returned if all bytes have been read.

Overrides:
readByte in class BufferInput
Returns:
next unsigned byte
See Also:
InputStream.read()