org.apache.ignite.internal.processors.igfs

## Class IgfsLazySecondaryFileSystemPositionedReadable

- java.lang.Object
- - org.apache.ignite.internal.processors.igfs.IgfsLazySecondaryFileSystemPositionedReadable

All Implemented Interfaces:
  Closeable, AutoCloseable, IgfsSecondaryFileSystemPositionedReadable

    public class IgfsLazySecondaryFileSystemPositionedReadable
    extends Object
    implements IgfsSecondaryFileSystemPositionedReadable

Lazy readable entity which is opened on demand.

### Constructor Summary

Constructors
Constructor and Description
`IgfsLazySecondaryFileSystemPositionedReadable(IgfsSecondaryFileSystem fs, IgfsPath path, int bufSize)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `close()`
`int` `read(long pos, 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.
`String` `toString()`

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

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

### Constructor Detail

#### IgfsLazySecondaryFileSystemPositionedReadable

    public IgfsLazySecondaryFileSystemPositionedReadable(IgfsSecondaryFileSystem fs,
                                                         IgfsPath path,
                                                         int bufSize)

Constructor.

Parameters:
  `fs` - File system.
  `path` - Path.
  `bufSize` - Buffer size.

### Method Detail

#### read

    public int read(long pos,
                    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:
  `pos` - 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.

#### close

    public void close()
               throws IOException

Specified by:
  `close` in interface `Closeable`
Specified by:
  `close` in interface `AutoCloseable`
Throws:
  `IOException`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.4.0
Release Date | : March 5 2018