org.elasticsearch.common.io
Class FileChannelInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.elasticsearch.common.io.FileChannelInputStream
All Implemented Interfaces:
Closeable

public class FileChannelInputStream
extends InputStream


Constructor Summary
FileChannelInputStream(FileChannel channel, long position, long length)
           
 
Method Summary
 void mark(int readlimit)
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] bs, int off, int len)
           
 void reset()
           
 
Methods inherited from class java.io.InputStream
available, close, read, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileChannelInputStream

public FileChannelInputStream(FileChannel channel,
                              long position,
                              long length)
Parameters:
channel - The channel to read from
position - The position to start reading from
length - The length to read
Method Detail

read

public int read()
         throws IOException
Specified by:
read in class InputStream
Throws:
IOException

read

public int read(byte[] bs,
                int off,
                int len)
         throws IOException
Overrides:
read in class InputStream
Throws:
IOException

markSupported

public boolean markSupported()
Overrides:
markSupported in class InputStream

mark

public void mark(int readlimit)
Overrides:
mark in class InputStream

reset

public void reset()
           throws IOException
Overrides:
reset in class InputStream
Throws:
IOException


Copyright © 2009-2012. All Rights Reserved.