Package org.apache.solr.update
Class TransactionLog.ChannelFastInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.solr.common.util.DataInputInputStream
-
- org.apache.solr.common.util.FastInputStream
-
- org.apache.solr.update.TransactionLog.ChannelFastInputStream
-
- All Implemented Interfaces:
Closeable
,DataInput
,AutoCloseable
- Enclosing class:
- TransactionLog
public static class TransactionLog.ChannelFastInputStream extends org.apache.solr.common.util.FastInputStream
-
-
Field Summary
Fields Modifier and Type Field Description protected FileChannel
ch
-
Constructor Summary
Constructors Constructor Description ChannelFastInputStream(FileChannel ch, long chPosition)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
long
getBufferPos()
where is the start of the buffer relative to the whole fileint
getBufferSize()
int
readWrappedStream(byte[] target, int offset, int len)
void
seek(long position)
String
toString()
-
Methods inherited from class org.apache.solr.common.util.FastInputStream
available, getBuffer, getEndInBuffer, getPositionInBuffer, peek, position, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, refill, skipBytes, wrap
-
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
-
-
-
Field Detail
-
ch
protected FileChannel ch
-
-
Constructor Detail
-
ChannelFastInputStream
public ChannelFastInputStream(FileChannel ch, long chPosition)
-
-
Method Detail
-
readWrappedStream
public int readWrappedStream(byte[] target, int offset, int len) throws IOException
- Overrides:
readWrappedStream
in classorg.apache.solr.common.util.FastInputStream
- Throws:
IOException
-
seek
public void seek(long position) throws IOException
- Throws:
IOException
-
getBufferPos
public long getBufferPos()
where is the start of the buffer relative to the whole file
-
getBufferSize
public int getBufferSize()
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classorg.apache.solr.common.util.FastInputStream
- Throws:
IOException
-
-