Package org.h2.mvstore
Class StreamStore.Stream
- java.lang.Object
-
- java.io.InputStream
-
- org.h2.mvstore.StreamStore.Stream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Enclosing class:
- StreamStore
static class StreamStore.Stream extends java.io.InputStream
A stream backed by a map.
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.ByteArrayInputStream
buffer
private java.nio.ByteBuffer
idBuffer
private long
length
private byte[]
oneByteBuffer
private long
pos
private long
skip
private StreamStore
store
-
Constructor Summary
Constructors Constructor Description Stream(StreamStore store, byte[] id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
private java.io.ByteArrayInputStream
nextBuffer()
int
read()
int
read(byte[] b, int off, int len)
long
skip(long n)
-
-
-
Field Detail
-
store
private final StreamStore store
-
oneByteBuffer
private byte[] oneByteBuffer
-
idBuffer
private java.nio.ByteBuffer idBuffer
-
buffer
private java.io.ByteArrayInputStream buffer
-
skip
private long skip
-
length
private final long length
-
pos
private long pos
-
-
Constructor Detail
-
Stream
Stream(StreamStore store, byte[] id)
-
-
Method Detail
-
read
public int read() throws java.io.IOException
- Specified by:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
skip
public long skip(long n)
- Overrides:
skip
in classjava.io.InputStream
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.InputStream
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
nextBuffer
private java.io.ByteArrayInputStream nextBuffer()
-
-