Class AttributeOutputStream

java.lang.Object
simula.compiler.AttributeOutputStream

public class AttributeOutputStream extends Object

Attribute output stream.

Link to GitHub: Source File.

Author:
Øystein Myhre Andersen
  • Field Details

    • oupt

      The underlying DataOutputStream.
    • TRACE

      private boolean TRACE
      Debug utility.
  • Constructor Details

    • AttributeOutputStream

      public AttributeOutputStream(OutputStream oupt) throws IOException
      Creates a new AttributeOutputStream to write data to the specified OutputStream.
      Parameters:
      oupt - the underlying OutputStream.
      Throws:
      IOException - if an I/O error occurs.
  • Method Details

    • close

      public void close() throws IOException
      Closes this AttributeOutputStream.
      Throws:
      IOException - if an I/O error occurs.
    • writeKind

      public void writeKind(int i) throws IOException
      Writes a kind code to the underlying DataOutputStream.
      Parameters:
      i - a kind code to be written.
      Throws:
      IOException - if an I/O error occurs.
    • writeType

      public void writeType(Type type) throws IOException
      Writes a type to the underlying DataOutputStream.
      Parameters:
      type - a type to be written.
      Throws:
      IOException - if an I/O error occurs.
    • writeBoolean

      public void writeBoolean(boolean b) throws IOException
      Writes a boolean to the underlying DataOutputStream.
      Parameters:
      b - a boolean to be written.
      Throws:
      IOException - if an I/O error occurs.
    • writeShort

      public void writeShort(int i) throws IOException
      Writes a short to the underlying DataOutputStream.
      Parameters:
      i - a short to be written.
      Throws:
      IOException - if an I/O error occurs.
    • writeConstant

      public void writeConstant(Object c) throws IOException
      Writes a typed constant to the underlying DataOutputStream.
      Parameters:
      c - a typed constant to be written.
      Throws:
      IOException - if an I/O error occurs.
    • writeString

      public void writeString(String s) throws IOException
      Writes a String to the underlying DataOutputStream.
      Parameters:
      s - a String to be written.
      Throws:
      IOException - if an I/O error occurs.
    • writeObjectList

      public void writeObjectList(ObjectList<?> list) throws IOException
      Writes a Object list to the underlying DataOutputStream.
      Parameters:
      list - a Object list to be written.
      Throws:
      IOException - if an I/O error occurs.
    • writeObj

      public void writeObj(SyntaxClass obj) throws IOException
      Writes a Object to the underlying DataOutputStream.
      Parameters:
      obj - a Object to be written.
      Throws:
      IOException - if an I/O error occurs.