## org.exist.storage.io
Class AbstractVariableByteInput

    java.lang.Object
      org.exist.storage.io.AbstractVariableByteInput

All Implemented Interfaces:
  VariableByteInput

Direct Known Subclasses:
  VariableByteArrayInput, VariableByteInputStream

public abstract class AbstractVariableByteInput
extends java.lang.Object
implements VariableByteInput

Abstract base class for implementations of VariableByteInput.

Author:
  wolf

Constructor Summary
`AbstractVariableByteInput()`

Method Summary
`abstract int` `available()` Returns a value > 0 if more bytes can be read from the input.
`void` `copyRaw(VariableByteOutputStream os, int count)`
`void` `copyTo(VariableByteOutputStream os)` Copy the next numeric value from the input to the specified output stream.
`void` `copyTo(VariableByteOutputStream os, int count)` Copy the count next numeric values from the input to the specified output stream.
`abstract int` `read()` Read a single byte and return as an int value.
`int` `read(byte[] data)` Fill the provided byte array with data from the input.
`int` `read(byte[] b, int off, int len)`
`byte` `readByte()` Read a single byte.
`int` `readFixedInt()`
`int` `readInt()` Read an integer value in variable byte encoding.
`long` `readLong()` Read a long value in variable byte encoding.
`short` `readShort()` Read a short value in variable byte encoding.
`java.lang.String` `readUTF()`
`void` `release()`
`void` `skip(int count)` Read the following count numeric values from the input and drop them.
`void` `skipBytes(long count)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AbstractVariableByteInput

    public AbstractVariableByteInput()

Method Detail

### available

    public abstract int available()
                           throws java.io.IOException

  Description copied from interface: `VariableByteInput`
  Returns a value > 0 if more bytes can be read from the input.

  Specified by:
    `available` in interface `VariableByteInput`
  Throws:
    `java.io.IOException`

### read

    public abstract int read()
                      throws java.io.IOException

  Description copied from interface: `VariableByteInput`
  Read a single byte and return as an int value.

  Specified by:
    `read` in interface `VariableByteInput`
  Returns:
    the byte value as int or -1 if no more bytes are available.
  Throws:
    `java.io.IOException`

### readByte

    public byte readByte()
                  throws java.io.IOException

  Description copied from interface: `VariableByteInput`
  Read a single byte. Throws EOFException if no more bytes are available.

  Specified by:
    `readByte` in interface `VariableByteInput`
  Throws:
    `java.io.IOException`

### readShort

    public short readShort()
                    throws java.io.IOException

  Description copied from interface: `VariableByteInput`
  Read a short value in variable byte encoding.

  Specified by:
    `readShort` in interface `VariableByteInput`
  Throws:
    `java.io.IOException`

### readInt

    public int readInt()
                throws java.io.IOException

  Description copied from interface: `VariableByteInput`
  Read an integer value in variable byte encoding.

  Specified by:
    `readInt` in interface `VariableByteInput`
  Throws:
    `java.io.IOException`

### readFixedInt

    public int readFixedInt()
                     throws java.io.IOException

  Specified by:
    `readFixedInt` in interface `VariableByteInput`
  Throws:
    `java.io.IOException`

### readLong

    public long readLong()
                  throws java.io.IOException

  Description copied from interface: `VariableByteInput`
  Read a long value in variable byte encoding.

  Specified by:
    `readLong` in interface `VariableByteInput`
  Throws:
    `java.io.IOException`

### readUTF

    public java.lang.String readUTF()
                             throws java.io.IOException,
                                    java.io.EOFException

  Specified by:
    `readUTF` in interface `VariableByteInput`
  Throws:
    `java.io.IOException`
    `java.io.EOFException`

### skip

    public void skip(int count)
              throws java.io.IOException

  Description copied from interface: `VariableByteInput`
  Read the following count numeric values from the input and drop them.

  Specified by:
    `skip` in interface `VariableByteInput`
  Parameters:
    `count` -
  Throws:
    `java.io.IOException`

### skipBytes

    public void skipBytes(long count)
                   throws java.io.IOException

  Specified by:
    `skipBytes` in interface `VariableByteInput`
  Throws:
    `java.io.IOException`

### read

    public int read(byte[] data)
             throws java.io.IOException

  Description copied from interface: `VariableByteInput`
  Fill the provided byte array with data from the input.

  Specified by:
    `read` in interface `VariableByteInput`
  Parameters:
    `data` -
  Throws:
    `java.io.IOException`

### read

    public int read(byte[] b,
                    int off,
                    int len)
             throws java.io.IOException

  Specified by:
    `read` in interface `VariableByteInput`
  Throws:
    `java.io.IOException`

### copyTo

    public void copyTo(VariableByteOutputStream os)
                throws java.io.IOException

  Description copied from interface: `VariableByteInput`
  Copy the next numeric value from the input to the specified output stream.

  Specified by:
    `copyTo` in interface `VariableByteInput`
  Parameters:
    `os` -
  Throws:
    `java.io.IOException`

### copyTo

    public void copyTo(VariableByteOutputStream os,
                       int count)
                throws java.io.IOException

  Description copied from interface: `VariableByteInput`
  Copy the count next numeric values from the input to the specified output stream.

  Specified by:
    `copyTo` in interface `VariableByteInput`
  Parameters:
    `os` -
    `count` -
  Throws:
    `java.io.IOException`

### copyRaw

    public void copyRaw(VariableByteOutputStream os,
                        int count)
                 throws java.io.IOException

  Specified by:
    `copyRaw` in interface `VariableByteInput`
  Throws:
    `java.io.IOException`

### release

    public void release()

Copyright (C) Wolfgang Meier. All rights reserved.