Documentation of 'org.encog.parse.PeekableInputStream' Java class
PeekableInputStream
org.encog.parse

Class PeekableInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable


    public class PeekableInputStream
    extends java.io.InputStream
    This is a special input stream that allows the program to peek one or more characters ahead in the file.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int INITIAL_DEPTH
      The depth to peek.
    • Constructor Summary

      Constructors 
      Constructor and Description
      PeekableInputStream(java.io.InputStream is)
      The constructor accepts an InputStream to setup the object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int peek()
      Peek at the next character from the stream.
      int peek(int depth)
      Peek at a specified depth.
      boolean peek(java.lang.String str)
      Peek ahead and see if the specified string is present.
      int read()
      Read a single byte from the stream.
      long skip(long count)
      Skip the specified number of bytes.
      • Methods inherited from class java.io.InputStream

        available, close, mark, markSupported, read, read, reset
      • Methods inherited from class java.lang.Object

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

      • INITIAL_DEPTH

        public static final int INITIAL_DEPTH
        The depth to peek.
        See Also:
        Constant Field Values
    • Constructor Detail

      • PeekableInputStream

        public PeekableInputStream(java.io.InputStream is)
        The constructor accepts an InputStream to setup the object.
        Parameters:
        is - The InputStream to parse.
    • Method Detail

      • peek

        public int peek()
        Peek at the next character from the stream.
        Returns:
        The next character.
      • peek

        public int peek(int depth)
        Peek at a specified depth.
        Parameters:
        depth - The depth to check.
        Returns:
        The character peeked at.
      • peek

        public boolean peek(java.lang.String str)
        Peek ahead and see if the specified string is present.
        Parameters:
        str - The string we are looking for.
        Returns:
        True if the string was found.
      • read

        public int read()
        Read a single byte from the stream.
        Specified by:
        read in class java.io.InputStream
        Returns:
        The character that was read from the stream.
      • skip

        public long skip(long count)
        Skip the specified number of bytes.
        Overrides:
        skip in class java.io.InputStream
        Parameters:
        count - The number of bytes to skip.
        Returns:
        The actual number of bytes skipped.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.