com.devexperts.qd.util
Class ByteArrayDataInput

java.lang.Object
  extended by com.devexperts.qd.util.ByteArrayBuffer
      extended by com.devexperts.qd.util.ByteArrayDataInput
All Implemented Interfaces:
java.io.DataInput, java.io.Serializable

Deprecated. Use ByteArrayInput class instead.

@Deprecated
public class ByteArrayDataInput
extends ByteArrayBuffer
implements java.io.DataInput

The ByteArrayDataInput implements DataInput interface using byte array buffer.

See Also:
Serialized Form

Nested Class Summary
static class ByteArrayDataInput.EndOfBufferException
          Deprecated. This exception is thrown when attempt to read past limit is made.
 
Field Summary
 
Fields inherited from class com.devexperts.qd.util.ByteArrayBuffer
buffer, limit, position
 
Constructor Summary
ByteArrayDataInput()
          Deprecated.  
 
Method Summary
 void expandLimit(int required_limit)
          Deprecated. This implementation throws ByteArrayDataInput.EndOfBufferException
protected  int readAvailableBytes(int n)
          Deprecated. Makes an attempt to read n bytes of data into the buffer.
 boolean readBoolean()
          Deprecated.  
 byte readByte()
          Deprecated.  
 char readChar()
          Deprecated.  
 double readDouble()
          Deprecated.  
 float readFloat()
          Deprecated.  
 void readFully(byte[] b)
          Deprecated.  
 void readFully(byte[] b, int off, int len)
          Deprecated.  
 int readInt()
          Deprecated.  
 java.lang.String readLine()
          Deprecated.  
 long readLong()
          Deprecated.  
 short readShort()
          Deprecated.  
 int readUnsignedByte()
          Deprecated.  
 int readUnsignedShort()
          Deprecated.  
 java.lang.String readUTF()
          Deprecated.  
 int skipBytes(int n)
          Deprecated.  
 
Methods inherited from class com.devexperts.qd.util.ByteArrayBuffer
clear, copy, ensureCapacity, getBuffer, getLimit, getPosition, setBuffer, setLimit, setPosition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteArrayDataInput

public ByteArrayDataInput()
Deprecated. 
Method Detail

readAvailableBytes

protected int readAvailableBytes(int n)
                          throws java.io.IOException
Deprecated. 
Makes an attempt to read n bytes of data into the buffer. This method may read smaller number of bytes (possibly zero) or larger number of bytes depending on availability. This method never throws an EOFException. The actual number of bytes read is returned.

This method is used by skipBytes(int) and readLine() methods instead of an expandLimit(int) method.

The default implementation simply returns zero.

Throws:
java.io.IOException - if an I/O error occurs.

readFully

public void readFully(byte[] b)
               throws java.io.IOException
Deprecated. 
Specified by:
readFully in interface java.io.DataInput
Throws:
java.io.IOException

readFully

public void readFully(byte[] b,
                      int off,
                      int len)
               throws java.io.IOException
Deprecated. 
Specified by:
readFully in interface java.io.DataInput
Throws:
java.io.IOException

skipBytes

public int skipBytes(int n)
              throws java.io.IOException
Deprecated. 
Specified by:
skipBytes in interface java.io.DataInput
Throws:
java.io.IOException

readBoolean

public boolean readBoolean()
                    throws java.io.IOException
Deprecated. 
Specified by:
readBoolean in interface java.io.DataInput
Throws:
java.io.IOException

readByte

public byte readByte()
              throws java.io.IOException
Deprecated. 
Specified by:
readByte in interface java.io.DataInput
Throws:
java.io.IOException

readUnsignedByte

public int readUnsignedByte()
                     throws java.io.IOException
Deprecated. 
Specified by:
readUnsignedByte in interface java.io.DataInput
Throws:
java.io.IOException

readShort

public short readShort()
                throws java.io.IOException
Deprecated. 
Specified by:
readShort in interface java.io.DataInput
Throws:
java.io.IOException

readUnsignedShort

public int readUnsignedShort()
                      throws java.io.IOException
Deprecated. 
Specified by:
readUnsignedShort in interface java.io.DataInput
Throws:
java.io.IOException

readChar

public char readChar()
              throws java.io.IOException
Deprecated. 
Specified by:
readChar in interface java.io.DataInput
Throws:
java.io.IOException

readInt

public int readInt()
            throws java.io.IOException
Deprecated. 
Specified by:
readInt in interface java.io.DataInput
Throws:
java.io.IOException

readLong

public long readLong()
              throws java.io.IOException
Deprecated. 
Specified by:
readLong in interface java.io.DataInput
Throws:
java.io.IOException

readFloat

public float readFloat()
                throws java.io.IOException
Deprecated. 
Specified by:
readFloat in interface java.io.DataInput
Throws:
java.io.IOException

readDouble

public double readDouble()
                  throws java.io.IOException
Deprecated. 
Specified by:
readDouble in interface java.io.DataInput
Throws:
java.io.IOException

readLine

public java.lang.String readLine()
                          throws java.io.IOException
Deprecated. 
Specified by:
readLine in interface java.io.DataInput
Throws:
java.io.IOException

readUTF

public java.lang.String readUTF()
                         throws java.io.IOException
Deprecated. 
Specified by:
readUTF in interface java.io.DataInput
Throws:
java.io.IOException

expandLimit

public void expandLimit(int required_limit)
                 throws java.io.IOException
Deprecated. 
This implementation throws ByteArrayDataInput.EndOfBufferException

Overrides:
expandLimit in class ByteArrayBuffer
Throws:
java.io.IOException - if an I/O error occurs (expansion impossible).