Interface DataInputView

    • Method Detail

      • skipBytesToRead

        void skipBytesToRead​(int numBytes)
                      throws IOException
        Skips numBytes bytes of memory. In contrast to the DataInput.skipBytes(int) method, this method always skips the desired number of bytes or throws an EOFException.
        Parameters:
        numBytes - The number of bytes to skip.
        Throws:
        IOException - Thrown, if any I/O related problem occurred such that the input could not be advanced to the desired position.
      • read

        int read​(byte[] b,
                 int off,
                 int len)
          throws IOException
        Reads up to len bytes of memory and stores it into b starting at offset off.

        If len is zero, then no bytes are read and 0 is returned; otherwise, there is an attempt to read at least one byte. If there is no more data left, the value -1 is returned; otherwise, at least one byte is read and stored into b.

        Parameters:
        b - byte array to store the data to
        off - offset into byte array
        len - byte length to read
        Returns:
        the number of actually read bytes of -1 if there is no more data left
        Throws:
        IOException
      • read

        int read​(byte[] b)
          throws IOException
        Tries to fill the given byte array b. Returns the actually number of read bytes or -1 if there is no more data.
        Parameters:
        b - byte array to store the data to
        Returns:
        the number of read bytes or -1 if there is no more data left
        Throws:
        IOException