org.apache.ignite.internal.processors.igfs.secondary.local

## Class LocalFileSystemPositionedReadable

- java.lang.Object
- - java.io.InputStream
  - - java.io.FilterInputStream
    - - java.io.BufferedInputStream
      - - org.apache.ignite.internal.processors.igfs.secondary.local.LocalFileSystemPositionedReadable

All Implemented Interfaces:
  Closeable, AutoCloseable, IgfsSecondaryFileSystemPositionedReadable

    public class LocalFileSystemPositionedReadable
    extends BufferedInputStream
    implements IgfsSecondaryFileSystemPositionedReadable

Positioned readable interface for local secondary file system.

### Field Summary

### Fields inherited from class java.io.BufferedInputStream

`buf, count, marklimit, markpos, pos`

### Fields inherited from class java.io.FilterInputStream

`in`

### Constructor Summary

Constructors
Constructor and Description
`LocalFileSystemPositionedReadable(FileInputStream in, int bufSize)` Constructor.

### Method Summary

Methods
`int` `read(long readPos, byte[] buf, int off, int len)` Read up to the specified number of bytes, from a given position within a file, and return the number of bytes read.

### Methods inherited from class java.io.BufferedInputStream

`available, close, mark, markSupported, read, read, reset, skip`

### Methods inherited from class java.io.FilterInputStream

`read`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.io.Closeable

`close`

### Constructor Detail

#### LocalFileSystemPositionedReadable

    public LocalFileSystemPositionedReadable(FileInputStream in,
                                     int bufSize)

Constructor.

Parameters:
  `in` - Input stream.
  `bufSize` - Buffer size.

### Method Detail

#### read

    public int read(long readPos,
           byte[] buf,
           int off,
           int len)
             throws IOException

Read up to the specified number of bytes, from a given position within a file, and return the number of bytes read.

Specified by:
  `read` in interface `IgfsSecondaryFileSystemPositionedReadable`
Parameters:
  `readPos` - Position in the input stream to seek.
  `buf` - Buffer into which data is read.
  `off` - Offset in the buffer from which stream data should be written.
  `len` - The number of bytes to read.
Returns:
  Total number of bytes read into the buffer, or -1 if there is no more data (EOF).
Throws:
  `IOException` - In case of any exception.

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.0.0
Release Date | : April 30 2017