JML

java.io
Class ObjectInputStream.BlockDataInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byjava.io.ObjectInputStream.BlockDataInputStream
All Implemented Interfaces:
DataInput
Enclosing class:
ObjectInputStream

private class ObjectInputStream.BlockDataInputStream
extends InputStream
implements DataInput


Model Field Summary
 
Model fields inherited from class java.io.InputStream
_markSupported, availableBytes, input, inputBytes, isOpen, markLimit, markPosition, readPosition, wasClosed
 
Model fields inherited from class java.lang.Object
_getClass, objectState, theString
 
Model fields inherited from interface java.io.DataInput
bytesRead, input
 
Ghost Field Summary
 
Ghost fields inherited from class java.lang.Object
objectTimesFinalized, owner
 
Field Summary
private  boolean blkmode
           
private  byte[] buf
           
private  char[] cbuf
           
private static int CHAR_BUF_SIZE
           
private  DataInputStream din
           
private  int end
           
private  byte[] hbuf
           
private static int HEADER_BLOCKED
           
private  ObjectInputStream.PeekInputStream in
           
private static int MAX_BLOCK_SIZE
           
private static int MAX_HEADER_SIZE
           
private  int pos
           
private  int unread
           
 
Constructor Summary
(package private) ObjectInputStream.BlockDataInputStream(ObjectInputStream, InputStream)
           
 
Model Method Summary
 
Model methods inherited from class java.lang.Object
hashValue
 
Method Summary
 int available()
           
 void close()
           
(package private)  int currentBlockRemaining()
           
(package private)  boolean getBlockDataMode()
           
(package private)  int peek()
           
(package private)  byte peekByte()
           
 int read()
           
 int read(byte[], int, int)
           
(package private)  int read(byte[], int, int, boolean)
           
private  int readBlockHeader(boolean)
           
 boolean readBoolean()
           
(package private)  void readBooleans(boolean[], int, int)
           
 byte readByte()
           
 char readChar()
           
(package private)  void readChars(char[], int, int)
           
 double readDouble()
           
(package private)  void readDoubles(double[], int, int)
           
 float readFloat()
           
(package private)  void readFloats(float[], int, int)
           
 void readFully(byte[])
           
 void readFully(byte[], int, int)
           
 void readFully(byte[], int, int, boolean)
           
 int readInt()
           
(package private)  void readInts(int[], int, int)
           
 String readLine()
           
 long readLong()
           
(package private)  void readLongs(long[], int, int)
           
(package private)  String readLongUTF()
           
 short readShort()
           
(package private)  void readShorts(short[], int, int)
           
 int readUnsignedByte()
           
 int readUnsignedShort()
           
 String readUTF()
           
private  String readUTFBody(long)
           
private  int readUTFChar(StringBuffer, long)
           
private  long readUTFSpan(StringBuffer, long)
           
private  void refill()
           
(package private)  boolean setBlockDataMode(boolean)
           
 long skip(long)
           
(package private)  void skipBlockData()
           
 int skipBytes(int)
           
 
Methods inherited from class java.io.InputStream
mark, markSupported, read, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHAR_BUF_SIZE

private static final int CHAR_BUF_SIZE

MAX_BLOCK_SIZE

private static final int MAX_BLOCK_SIZE

MAX_HEADER_SIZE

private static final int MAX_HEADER_SIZE

end

private int end

cbuf

private final char[] cbuf

HEADER_BLOCKED

private static final int HEADER_BLOCKED

pos

private int pos

in

private final ObjectInputStream.PeekInputStream in

buf

private final byte[] buf

unread

private int unread

blkmode

private boolean blkmode

hbuf

private final byte[] hbuf

din

private final DataInputStream din
Constructor Detail

ObjectInputStream.BlockDataInputStream

ObjectInputStream.BlockDataInputStream(ObjectInputStream,
                                       InputStream)
Method Detail

peekByte

byte peekByte()
        throws IOException
Throws:
IOException

readByte

public byte readByte()
              throws IOException
Specified by:
readByte in interface DataInput
Throws:
IOException

readChar

public char readChar()
              throws IOException
Specified by:
readChar in interface DataInput
Throws:
IOException

readDouble

public double readDouble()
                  throws IOException
Specified by:
readDouble in interface DataInput
Throws:
IOException

readFloat

public float readFloat()
                throws IOException
Specified by:
readFloat in interface DataInput
Throws:
IOException

available

public int available()
              throws IOException
Overrides:
available in class InputStream
Throws:
IOException

currentBlockRemaining

int currentBlockRemaining()

peek

int peek()
   throws IOException
Throws:
IOException

read

public int read()
         throws IOException
Throws:
IOException

readInt

public int readInt()
            throws IOException
Specified by:
readInt in interface DataInput
Throws:
IOException

readUnsignedByte

public int readUnsignedByte()
                     throws IOException
Specified by:
readUnsignedByte in interface DataInput
Throws:
IOException

readUnsignedShort

public int readUnsignedShort()
                      throws IOException
Specified by:
readUnsignedShort in interface DataInput
Throws:
IOException

readLong

public long readLong()
              throws IOException
Specified by:
readLong in interface DataInput
Throws:
IOException

readShort

public short readShort()
                throws IOException
Specified by:
readShort in interface DataInput
Throws:
IOException

close

public void close()
           throws IOException
Overrides:
close in class InputStream
Throws:
IOException

refill

private void refill()
             throws IOException
Throws:
IOException

skipBlockData

void skipBlockData()
             throws IOException
Throws:
IOException

getBlockDataMode

boolean getBlockDataMode()

readBoolean

public boolean readBoolean()
                    throws IOException
Specified by:
readBoolean in interface DataInput
Throws:
IOException

skipBytes

public int skipBytes(int)
              throws IOException
Specified by:
skipBytes in interface DataInput
Throws:
IOException

skip

public long skip(long)
          throws IOException
Overrides:
skip in class InputStream
Throws:
IOException

readBlockHeader

private int readBlockHeader(boolean)
                     throws IOException
Throws:
IOException

setBlockDataMode

boolean setBlockDataMode(boolean)
                   throws IOException
Throws:
IOException

readFully

public void readFully(byte[])
               throws IOException
Specified by:
readFully in interface DataInput
Throws:
IOException

read

public int read(byte[],
                int,
                int)
         throws IOException
Overrides:
read in class InputStream
Throws:
IOException

readFully

public void readFully(byte[],
                      int,
                      int)
               throws IOException
Specified by:
readFully in interface DataInput
Throws:
IOException

read

int read(byte[],
         int,
         int,
         boolean)
   throws IOException
Throws:
IOException

readFully

public void readFully(byte[],
                      int,
                      int,
                      boolean)
               throws IOException
Throws:
IOException

readChars

void readChars(char[],
               int,
               int)
         throws IOException
Throws:
IOException

readDoubles

void readDoubles(double[],
                 int,
                 int)
           throws IOException
Throws:
IOException

readFloats

void readFloats(float[],
                int,
                int)
          throws IOException
Throws:
IOException

readInts

void readInts(int[],
              int,
              int)
        throws IOException
Throws:
IOException

readLongs

void readLongs(long[],
               int,
               int)
         throws IOException
Throws:
IOException

readShorts

void readShorts(short[],
                int,
                int)
          throws IOException
Throws:
IOException

readBooleans

void readBooleans(boolean[],
                  int,
                  int)
            throws IOException
Throws:
IOException

readLine

public String readLine()
                throws IOException
Specified by:
readLine in interface DataInput
Throws:
IOException

readLongUTF

String readLongUTF()
             throws IOException
Throws:
IOException

readUTF

public String readUTF()
               throws IOException
Specified by:
readUTF in interface DataInput
Throws:
IOException

readUTFBody

private String readUTFBody(long)
                    throws IOException
Throws:
IOException

readUTFChar

private int readUTFChar(StringBuffer,
                        long)
                 throws IOException
Throws:
IOException

readUTFSpan

private long readUTFSpan(StringBuffer,
                         long)
                  throws IOException
Throws:
IOException

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.