Class BinaryIOWrapper

  • Direct Known Subclasses:
    TextIOWrapper

    public class BinaryIOWrapper
    extends TextIOBase
    A Buffered text stream in binary mode.
    Author:
    Philip Jenvey
    • Constructor Detail

      • BinaryIOWrapper

        public BinaryIOWrapper​(BufferedIOBase bufferedIO)
        Contruct a TextIOBase in binary mode, wrapping the given BufferedIOBase.
        Parameters:
        bufferedIO -
    • Method Detail

      • read

        public java.lang.String read​(int size)
        Description copied from class: TextIOBase
        Read and return up to size bytes, contained in a String. Returns an empty String on EOF
        Overrides:
        read in class TextIOBase
        Parameters:
        size - the number of bytes to read
        Returns:
        a String containing the bytes read
      • readall

        public java.lang.String readall()
        Description copied from class: TextIOBase
        Read until EOF.
        Overrides:
        readall in class TextIOBase
        Returns:
        a String containing the bytes read
      • readline

        public java.lang.String readline​(int size)
        Description copied from class: TextIOBase
        Read until size, newline or EOF. Returns an empty string if EOF is hit immediately.
        Overrides:
        readline in class TextIOBase
        Parameters:
        size - the number of bytes to read
        Returns:
        a String containing the bytes read
      • write

        public int write​(java.lang.String buf)
        Description copied from class: TextIOBase
        Write the given String to the IO stream. Returns the number of characters written.
        Overrides:
        write in class TextIOBase
        Parameters:
        buf - a String value
        Returns:
        the number of characters written as an int