public abstract class StreamInput extends InputStream
Constructor and Description |
---|
StreamInput() |
Modifier and Type | Method and Description |
---|---|
abstract void |
close()
Closes the stream to further operations.
|
Version |
getVersion() |
boolean |
readBoolean()
Reads a boolean.
|
abstract byte |
readByte()
Reads and returns a single byte.
|
abstract void |
readBytes(byte[] b,
int offset,
int len)
Reads a specified number of bytes into an array at the specified offset.
|
org.apache.lucene.util.BytesRef |
readBytesRef() |
org.apache.lucene.util.BytesRef |
readBytesRef(int length) |
BytesReference |
readBytesReference()
Reads a bytes reference from this stream, might hold an actual reference to the underlying
bytes of the stream.
|
BytesReference |
readBytesReference(int length)
Reads a bytes reference from this stream, might hold an actual reference to the underlying
bytes of the stream.
|
double |
readDouble() |
double[] |
readDoubleArray() |
float |
readFloat() |
float[] |
readFloatArray() |
void |
readFully(byte[] b) |
Object |
readGenericValue() |
int |
readInt()
Reads four bytes and returns an int.
|
int[] |
readIntArray() |
long |
readLong()
Reads eight bytes and returns a long.
|
long[] |
readLongArray() |
Map<String,Object> |
readMap() |
Boolean |
readOptionalBoolean() |
String |
readOptionalSharedString() |
<T extends Streamable> |
readOptionalStreamable(T streamable)
Serializes a potential null value.
|
String |
readOptionalString() |
Text |
readOptionalText() |
String |
readSharedString() |
Text |
readSharedText() |
short |
readShort() |
String |
readString() |
String[] |
readStringArray() |
Text |
readText() |
Text[] |
readTextArray() |
int |
readVInt()
Reads an int stored in variable-length format.
|
long |
readVLong()
Reads a long stored in variable-length format.
|
abstract void |
reset()
Resets the stream.
|
StreamInput |
setVersion(Version version) |
available, mark, markSupported, read, read, read, skip
public Version getVersion()
public StreamInput setVersion(Version version)
public abstract byte readByte() throws IOException
IOException
public abstract void readBytes(byte[] b, int offset, int len) throws IOException
b
- the array to read bytes intooffset
- the offset in the array to start storing byteslen
- the number of bytes to readIOException
public BytesReference readBytesReference() throws IOException
IOException
public BytesReference readBytesReference(int length) throws IOException
IOException
public org.apache.lucene.util.BytesRef readBytesRef() throws IOException
IOException
public org.apache.lucene.util.BytesRef readBytesRef(int length) throws IOException
IOException
public void readFully(byte[] b) throws IOException
IOException
public short readShort() throws IOException
IOException
public int readInt() throws IOException
IOException
public int readVInt() throws IOException
readInt()
IOException
public long readLong() throws IOException
IOException
public long readVLong() throws IOException
IOException
@Nullable public Text readOptionalText() throws IOException
IOException
public Text readText() throws IOException
IOException
public Text[] readTextArray() throws IOException
IOException
public Text readSharedText() throws IOException
IOException
@Nullable public String readOptionalString() throws IOException
IOException
@Nullable public String readOptionalSharedString() throws IOException
IOException
public String readString() throws IOException
IOException
public String readSharedString() throws IOException
IOException
public final float readFloat() throws IOException
IOException
public final double readDouble() throws IOException
IOException
public final boolean readBoolean() throws IOException
IOException
@Nullable public final Boolean readOptionalBoolean() throws IOException
IOException
public abstract void reset() throws IOException
reset
in class InputStream
IOException
public abstract void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
public String[] readStringArray() throws IOException
IOException
@Nullable public Map<String,Object> readMap() throws IOException
IOException
@Nullable public Object readGenericValue() throws IOException
IOException
public int[] readIntArray() throws IOException
IOException
public long[] readLongArray() throws IOException
IOException
public float[] readFloatArray() throws IOException
IOException
public double[] readDoubleArray() throws IOException
IOException
public <T extends Streamable> T readOptionalStreamable(T streamable) throws IOException
IOException
Copyright © 2009–2015. All rights reserved.