|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.InputStream java.io.FilterInputStream java.io.DataInputStream com.hdcookbook.grin.io.binary.GrinDataInputStream
public class GrinDataInputStream
GrinDataInputStream is a convenience DataInputStream subclass that can handle certain Objects and Object arrays, including null. This class is used by the GrinBinaryReader to read in information about the show nodes.
See also GrinDataOutputStream in the JavaSE tools.
GrinBinaryReader
Field Summary |
---|
Fields inherited from class java.io.FilterInputStream |
---|
in |
Method Summary | |
---|---|
boolean |
isNull()
Checks whether the Object reading is is null or not. |
java.awt.Color |
readColor()
Reads in and constructs a Color instance. |
Command[] |
readCommands()
Reads in information about Commands and reconstructs an array of Commands from it. |
Feature |
readFeatureReference()
Reads in a reference of a feature and returns an instance of the feature. |
Feature[] |
readFeaturesArrayReference()
Reads in refereces of Features and returns an array of Features corresponding to the references. |
int[] |
readIntArray()
Reads in and constructs an array of integer. |
RCHandler |
readRCHandlerReference()
Reads in a reference of an RCHandler and returns an instance of the RCHandler. |
RCHandler[] |
readRCHandlersArrayReference()
Reads in refereces of RCHandler and returns an array of the RCHandler. |
java.awt.Rectangle |
readRectangle()
Reads in and constructs a Rectangle instance. |
java.awt.Rectangle[] |
readRectangleArray()
Reads in and constructs an array of Rectangle. |
Segment |
readSegmentReference()
Reads in a reference of a segment and returns an instance of the segment. |
int[] |
readSharedIntArray()
Reads in an reference to an integer array. |
java.awt.Rectangle |
readSharedRectangle()
|
java.awt.Rectangle[] |
readSharedRectangleArray()
|
java.lang.String |
readString()
Reads in and constructs a String instance. |
java.lang.String[] |
readStringArray()
Reads in and constructs an array of Strings. |
void |
readSuperClassData(Command command)
Reads in information common to all Command types. |
void |
readSuperClassData(Feature feature)
Reads in information common to all Feature types. |
void |
readSuperClassData(RCHandler handler)
Reads in information common to all RChandler types. |
void |
readSuperClassData(Segment segment)
Reads in information common to all Segment types. |
Methods inherited from class java.io.DataInputStream |
---|
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes |
Methods inherited from class java.io.FilterInputStream |
---|
available, close, mark, markSupported, read, reset, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public java.awt.Color readColor() throws java.io.IOException
java.io.IOException
- if IO error occurs.public java.awt.Rectangle readRectangle() throws java.io.IOException
java.io.IOException
- if IO error occurs.public java.awt.Rectangle[] readRectangleArray() throws java.io.IOException
java.io.IOException
- if IO error occurs.public int[] readIntArray() throws java.io.IOException
java.io.IOException
- if IO error occurs.public int[] readSharedIntArray() throws java.io.IOException
java.io.IOException
- if IO error occurs.public java.awt.Rectangle[] readSharedRectangleArray() throws java.io.IOException
java.io.IOException
public java.awt.Rectangle readSharedRectangle() throws java.io.IOException
java.io.IOException
public java.lang.String readString() throws java.io.IOException
java.io.IOException
- if IO error occurs.public java.lang.String[] readStringArray() throws java.io.IOException
java.io.IOException
- if IO error occurs.public Feature readFeatureReference() throws java.io.IOException
java.io.IOException
public Segment readSegmentReference() throws java.io.IOException
java.io.IOException
public RCHandler readRCHandlerReference() throws java.io.IOException
java.io.IOException
public Feature[] readFeaturesArrayReference() throws java.io.IOException
java.io.IOException
public RCHandler[] readRCHandlersArrayReference() throws java.io.IOException
java.io.IOException
public Command[] readCommands() throws java.io.IOException
java.io.IOException
public boolean isNull() throws java.io.IOException
public void readInstanceData(GrinDataInputStream in) { ..... MyObject myObject = null; if (!in.isNull()) { // proceed with populating data in "myObject" } .... }
See also GrinDataOutputStream's writeNull and writeNonNull methods in the JavaSE tools.
java.io.IOException
public void readSuperClassData(Feature feature) throws java.io.IOException
See also GrinDataOutputStream's writeSuperClassData(Feature) method in the JavaSE tools.
feature
- the feature type of populate base data with.
java.io.IOException
public void readSuperClassData(RCHandler handler) throws java.io.IOException
See also GrinDataOutputStream's writeSuperClassData(RCHandler) method in the JavaSE tools.
handler
- RCHandler instance to populate data.
java.io.IOException
public void readSuperClassData(Segment segment) throws java.io.IOException
See also GrinDataOutputStream's writeSuperClassData(Segment) method in the JavaSE tools.
segment
- RCHandler instance to populate data.
java.io.IOException
public void readSuperClassData(Command command)
See also GrinDataOutputStream's writeSuperClassData(Command) method in the JavaSE tools.
command
- Command instance to populate data.
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |