PositionedReadable (Hadoop 1.2.1 API)
Date: 2013-07-22

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.fs
Interface PositionedReadable

All Known Implementing Classes:
  BufferedFSInputStream, FSDataInputStream, FSInputChecker, FSInputStream, FTPInputStream

    public interface PositionedReadable

Stream that permits positional reading.

Method Summary
`int` | `read(long position, byte[] buffer, int offset, int length)` Read upto the specified number of bytes, from a given position within a file, and return the number of bytes read.
`void` | `readFully(long position, byte[] buffer)` Read number of bytes equalt to the length of the buffer, from a given position within a file.
`void` | `readFully(long position, byte[] buffer, int offset, int length)` Read the specified number of bytes, from a given position within a file.

Method Detail

### read

    int read(long position,
             byte[] buffer,
             int offset,
             int length)
             throws IOException

  Read upto the specified number of bytes, from a given position within a file, and return the number of bytes read. This does not change the current offset of a file, and is thread-safe.

  Throws:
    `IOException`

### readFully

    void readFully(long position,
                   byte[] buffer,
                   int offset,
                   int length)
                   throws IOException

  Read the specified number of bytes, from a given position within a file. This does not change the current offset of a file, and is thread-safe.

  Throws:
    `IOException`

### readFully

    void readFully(long position,
                   byte[] buffer)
                   throws IOException

  Read number of bytes equalt to the length of the buffer, from a given position within a file. This does not change the current offset of a file, and is thread-safe.

  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation