Class AttributeInputStream
java.lang.Object
simula.compiler.AttributeInputStream
Attribute input stream.
Link to GitHub: Source File.
- Author:
- Øystein Myhre Andersen
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) DataInputStream
The underlying DataInputStream.The jarFile being read.(package private) String
The module ident.The Object Reference Table.private boolean
Debug utility. -
Constructor Summary
ConstructorsConstructorDescriptionAttributeInputStream
(InputStream inpt, String jarFileName) Creates a new AttributeInputStream to read data from the specified InputStream. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes this AttributeInputStream.boolean
Reads and returns a boolean from the underlying DataInputStream.Reads and returns a typed constant from the underlying DataInputStream.int
readKind()
Reads and returns a kind code from the underlying DataInputStream.readObj()
Reads and returns an Object from the underlying DataInputStream.private SyntaxClass
readObj
(int kind, AttributeInputStream inpt) Read and return an object.ObjectList
<?> Reads and returns an Object list from the underlying DataInputStream.int
readSEQU
(SyntaxClass obj) Reads and returns an Object sequence number from the underlying DataInputStream.int
Reads and returns a short from the underlying DataInputStream.Reads and returns a String from the underlying DataInputStream.readType()
Reads and returns a type from the underlying DataInputStream.
-
Field Details
-
moduleID
String moduleIDThe module ident. -
inpt
DataInputStream inptThe underlying DataInputStream. -
jarFileName
The jarFile being read. -
objectReference
The Object Reference Table. Used during Attribute File Input to fixup Object References. -
TRACE
private boolean TRACEDebug utility.
-
-
Constructor Details
-
AttributeInputStream
Creates a new AttributeInputStream to read data from the specified InputStream.- Parameters:
inpt
- the underlying InputStream.jarFileName
- the name of the jarFile containing this Attribute file.- Throws:
IOException
- if an I/O error occurs.
-
-
Method Details
-
close
Closes this AttributeInputStream.- Throws:
IOException
- if an I/O error occurs.
-
readKind
Reads and returns a kind code from the underlying DataInputStream.- Returns:
- the kind code read.
- Throws:
IOException
- if an I/O error occurs.
-
readType
Reads and returns a type from the underlying DataInputStream.- Returns:
- the type read.
- Throws:
IOException
- if an I/O error occurs.
-
readBoolean
Reads and returns a boolean from the underlying DataInputStream.- Returns:
- the boolean read.
- Throws:
IOException
- if an I/O error occurs.
-
readShort
Reads and returns a short from the underlying DataInputStream.- Returns:
- the short read.
- Throws:
IOException
- if an I/O error occurs.
-
readConstant
Reads and returns a typed constant from the underlying DataInputStream.- Returns:
- the typed constant read.
- Throws:
IOException
- if an I/O error occurs.
-
readString
Reads and returns a String from the underlying DataInputStream.- Returns:
- the String read.
- Throws:
IOException
- if an I/O error occurs.
-
readObjectList
Reads and returns an Object list from the underlying DataInputStream.- Returns:
- the Object list read.
- Throws:
IOException
- if an I/O error occurs.
-
readSEQU
Reads and returns an Object sequence number from the underlying DataInputStream.- Parameters:
obj
- the corresponding SyntaxClass object.- Returns:
- the Object sequence number read.
- Throws:
IOException
- if an I/O error occurs.
-
readObj
Reads and returns an Object from the underlying DataInputStream.- Returns:
- the Object read.
- Throws:
IOException
- if an I/O error occurs.
-
readObj
Read and return an object.- Parameters:
kind
- the object kind code.inpt
- the AttributeInputStream to read from.- Returns:
- the object read from the stream.
- Throws:
IOException
- if something went wrong.
-