Class ClassData.CDOutputStream

  • All Implemented Interfaces:
    CheckedDataOutputStream
    Enclosing class:
    ClassData

    private static class ClassData.CDOutputStream
    extends java.lang.Object
    implements CheckedDataOutputStream
    This is a wrapper for DataOutputStream, used for debugging purposes. it allows writing the byte-stream of a class up to a given byte number.
    • Field Detail

      • bytelimit

        private int bytelimit
      • dos

        private java.io.DataOutputStream dos
      • enabled

        public boolean enabled
    • Constructor Detail

      • CDOutputStream

        public CDOutputStream()
      • CDOutputStream

        public CDOutputStream​(java.io.OutputStream out)
    • Method Detail

      • setOutputStream

        public final void setOutputStream​(java.io.OutputStream out)
      • setDataOutputStream

        public void setDataOutputStream​(java.io.DataOutputStream dos)
      • setLimit

        public void setLimit​(int lim)
      • enable

        public void enable()
      • check

        private void check​(java.lang.String loc)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • write

        public void write​(int b)
                   throws java.io.IOException
        Specified by:
        write in interface CheckedDataOutputStream
        Throws:
        java.io.IOException
      • write

        public void write​(byte[] b,
                          int off,
                          int len)
                   throws java.io.IOException
        Specified by:
        write in interface CheckedDataOutputStream
        Throws:
        java.io.IOException
      • writeBoolean

        public final void writeBoolean​(boolean v)
                                throws java.io.IOException
        Specified by:
        writeBoolean in interface CheckedDataOutputStream
        Throws:
        java.io.IOException
      • writeByte

        public final void writeByte​(int v)
                             throws java.io.IOException
        Specified by:
        writeByte in interface CheckedDataOutputStream
        Throws:
        java.io.IOException
      • writeShort

        public void writeShort​(int v)
                        throws java.io.IOException
        Specified by:
        writeShort in interface CheckedDataOutputStream
        Throws:
        java.io.IOException
      • writeChar

        public void writeChar​(int v)
                       throws java.io.IOException
        Specified by:
        writeChar in interface CheckedDataOutputStream
        Throws:
        java.io.IOException
      • writeInt

        public void writeInt​(int v)
                      throws java.io.IOException
        Specified by:
        writeInt in interface CheckedDataOutputStream
        Throws:
        java.io.IOException
      • writeLong

        public void writeLong​(long v)
                       throws java.io.IOException
        Specified by:
        writeLong in interface CheckedDataOutputStream
        Throws:
        java.io.IOException
      • writeFloat

        public void writeFloat​(float v)
                        throws java.io.IOException
        Specified by:
        writeFloat in interface CheckedDataOutputStream
        Throws:
        java.io.IOException
      • writeDouble

        public void writeDouble​(double v)
                         throws java.io.IOException
        Specified by:
        writeDouble in interface CheckedDataOutputStream
        Throws:
        java.io.IOException
      • writeBytes

        public void writeBytes​(java.lang.String s)
                        throws java.io.IOException
        Specified by:
        writeBytes in interface CheckedDataOutputStream
        Throws:
        java.io.IOException
      • writeChars

        public void writeChars​(java.lang.String s)
                        throws java.io.IOException
        Specified by:
        writeChars in interface CheckedDataOutputStream
        Throws:
        java.io.IOException
      • writeUTF

        public void writeUTF​(java.lang.String s)
                      throws java.io.IOException
        Specified by:
        writeUTF in interface CheckedDataOutputStream
        Throws:
        java.io.IOException