Package org.w3c.tidy

Class StreamInJavaImpl

  • All Implemented Interfaces:
    StreamIn

    public class StreamInJavaImpl
    extends java.lang.Object
    implements StreamIn
    StreamIn Implementation using java writers.
    Version:
    $Revision: 1095 $ ($Author: aditsu $)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int bufpos
      actual position in buffer.
      private int[] charbuf
      character buffer.
      private static int CHARBUF_SIZE
      number of characters kept in buffer.
      private int curcol
      current column number.
      private int curline
      current line number.
      private boolean endOfStream
      has end of stream been reached?
      private int lastcol
      last column.
      private boolean pushed
      Is char pushed?
      private java.io.Reader reader
      Java input stream reader.
      private int tabs  
      private int tabsize
      tab size in chars.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected StreamInJavaImpl​(java.io.InputStream stream, java.lang.String encoding, int tabsize)
      Instantiates a new StreamInJavaImpl.
      protected StreamInJavaImpl​(java.io.Reader reader, int tabsize)
      Instantiates a new StreamInJavaImpl.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getCurcol()
      Getter for curcol.
      int getCurline()
      Getter for curline.
      boolean isEndOfStream()
      Has end of stream been reached?
      int readChar()
      Read a char.
      int readCharFromStream()
      reads a char from the stream.
      void setLexer​(Lexer lexer)
      Setter for lexer instance (needed for error reporting).
      void ungetChar​(int c)
      Unget a char.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CHARBUF_SIZE

        private static final int CHARBUF_SIZE
        number of characters kept in buffer.
        See Also:
        Constant Field Values
      • charbuf

        private int[] charbuf
        character buffer.
      • bufpos

        private int bufpos
        actual position in buffer.
      • reader

        private java.io.Reader reader
        Java input stream reader.
      • endOfStream

        private boolean endOfStream
        has end of stream been reached?
      • pushed

        private boolean pushed
        Is char pushed?
      • curcol

        private int curcol
        current column number.
      • lastcol

        private int lastcol
        last column.
      • curline

        private int curline
        current line number.
      • tabsize

        private int tabsize
        tab size in chars.
      • tabs

        private int tabs
    • Constructor Detail

      • StreamInJavaImpl

        protected StreamInJavaImpl​(java.io.InputStream stream,
                                   java.lang.String encoding,
                                   int tabsize)
                            throws java.io.UnsupportedEncodingException
        Instantiates a new StreamInJavaImpl.
        Parameters:
        stream -
        encoding -
        tabsize -
        Throws:
        java.io.UnsupportedEncodingException
      • StreamInJavaImpl

        protected StreamInJavaImpl​(java.io.Reader reader,
                                   int tabsize)
        Instantiates a new StreamInJavaImpl.
        Parameters:
        stream -
        encoding -
        tabsize -