Package com.indeed.util.mmap
Class MemoryInputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.indeed.util.mmap.MemoryInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public final class MemoryInputStream extends java.io.InputStream
-
-
Constructor Summary
Constructors Constructor Description MemoryInputStream(Memory memory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetPos()longlength()intread()intread(byte[] b)intread(byte[] b, int off, int len)voidseek(long position)longskip(long n)
-
-
-
Constructor Detail
-
MemoryInputStream
public MemoryInputStream(Memory memory)
-
-
Method Detail
-
read
public int read() throws java.io.IOException- Specified by:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
skip
public long skip(long n) throws java.io.IOException- Overrides:
skipin classjava.io.InputStream- Throws:
java.io.IOException
-
seek
public void seek(long position)
-
getPos
public long getPos()
-
length
public long length()
-
-