Class OffsetProtoStreamReader
- java.lang.Object
-
- org.wildfly.clustering.marshalling.protostream.OffsetProtoStreamReader
-
- All Implemented Interfaces:
org.infinispan.protostream.RawProtoStreamReader,org.infinispan.protostream.TagReader,ProtoStreamOperation,ProtoStreamReader
public class OffsetProtoStreamReader extends Object implements ProtoStreamReader
- Author:
- Paul Ferraro
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.wildfly.clustering.marshalling.protostream.ProtoStreamOperation
ProtoStreamOperation.Context
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidcheckLastTagWas(int tag)<T> FieldSetReader<T>createFieldSetReader(FieldReadable<T> reader, int startIndex)Returns a reader for a field set whose fields start at the specified index.byte[]fullBufferArray()InputStreamfullBufferInputStream()ProtoStreamOperation.ContextgetContext()Returns the context of this operationintgetCurrentTag()Returns the tag of the current field, or optional ifTagReader.readTag()was not yet called for the next field.org.infinispan.protostream.ImmutableSerializationContextgetSerializationContext()Returns the serialization context of the associated marshaller.booleanisAtEnd()booleanisInputStream()voidpopLimit(int oldLimit)intpushLimit(int limit)ObjectreadAny()Reads an object of an arbitrary type from this reader.booleanreadBool()byte[]readByteArray()ByteBufferreadByteBuffer()doublereadDouble()intreadEnum()intreadFixed32()Deprecated.longreadFixed64()Deprecated.floatreadFloat()intreadInt32()Deprecated.longreadInt64()Deprecated.<T> TreadObject(Class<T> targetClass)Reads an object of the specified type from this reader.intreadSFixed32()longreadSFixed64()intreadSInt32()longreadSInt64()StringreadString()intreadTag()intreadUInt32()longreadUInt64()booleanskipField(int tag)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.wildfly.clustering.marshalling.protostream.ProtoStreamOperation
findMarshaller
-
Methods inherited from interface org.wildfly.clustering.marshalling.protostream.ProtoStreamReader
readAny, readEnum, skipField
-
-
-
-
Method Detail
-
getContext
public ProtoStreamOperation.Context getContext()
Description copied from interface:ProtoStreamOperationReturns the context of this operation- Specified by:
getContextin interfaceProtoStreamOperation- Returns:
- the operation context
-
getSerializationContext
public org.infinispan.protostream.ImmutableSerializationContext getSerializationContext()
Description copied from interface:ProtoStreamOperationReturns the serialization context of the associated marshaller.- Specified by:
getSerializationContextin interfaceProtoStreamOperation- Returns:
- an immutable serialization context
-
createFieldSetReader
public <T> FieldSetReader<T> createFieldSetReader(FieldReadable<T> reader, int startIndex)
Description copied from interface:ProtoStreamReaderReturns a reader for a field set whose fields start at the specified index.- Specified by:
createFieldSetReaderin interfaceProtoStreamReader- Type Parameters:
T- the field builder type- Parameters:
reader- a field readerstartIndex- the start index for the field set- Returns:
- a field set reader
-
getCurrentTag
public int getCurrentTag()
Description copied from interface:ProtoStreamReaderReturns the tag of the current field, or optional ifTagReader.readTag()was not yet called for the next field.- Specified by:
getCurrentTagin interfaceProtoStreamReader- Returns:
-
isAtEnd
public boolean isAtEnd() throws IOException- Specified by:
isAtEndin interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
readTag
public int readTag() throws IOException- Specified by:
readTagin interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
readTagin interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
checkLastTagWas
public void checkLastTagWas(int tag) throws IOException- Specified by:
checkLastTagWasin interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
checkLastTagWasin interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
skipField
public boolean skipField(int tag) throws IOException- Specified by:
skipFieldin interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
skipFieldin interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
readBool
public boolean readBool() throws IOException- Specified by:
readBoolin interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
readBoolin interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
readEnum
public int readEnum() throws IOException- Specified by:
readEnumin interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
readEnumin interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
readString
public String readString() throws IOException
- Specified by:
readStringin interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
readStringin interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
readByteArray
public byte[] readByteArray() throws IOException- Specified by:
readByteArrayin interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
readByteArrayin interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
readByteBuffer
public ByteBuffer readByteBuffer() throws IOException
- Specified by:
readByteBufferin interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
readByteBufferin interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
readDouble
public double readDouble() throws IOException- Specified by:
readDoublein interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
readDoublein interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
readFloat
public float readFloat() throws IOException- Specified by:
readFloatin interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
readFloatin interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
readUInt64
public long readUInt64() throws IOException- Specified by:
readUInt64in interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
readUInt64in interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
readSInt64
public long readSInt64() throws IOException- Specified by:
readSInt64in interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
readSInt64in interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
readSFixed64
public long readSFixed64() throws IOException- Specified by:
readSFixed64in interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
readSFixed64in interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
readUInt32
public int readUInt32() throws IOException- Specified by:
readUInt32in interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
readUInt32in interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
readSInt32
public int readSInt32() throws IOException- Specified by:
readSInt32in interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
readSInt32in interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
readSFixed32
public int readSFixed32() throws IOException- Specified by:
readSFixed32in interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
readSFixed32in interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
pushLimit
public int pushLimit(int limit) throws IOException- Specified by:
pushLimitin interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
pushLimitin interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
popLimit
public void popLimit(int oldLimit)
- Specified by:
popLimitin interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
popLimitin interfaceorg.infinispan.protostream.TagReader
-
fullBufferArray
public byte[] fullBufferArray() throws IOException- Specified by:
fullBufferArrayin interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
fullBufferInputStream
public InputStream fullBufferInputStream() throws IOException
- Specified by:
fullBufferInputStreamin interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
isInputStream
public boolean isInputStream()
- Specified by:
isInputStreamin interfaceorg.infinispan.protostream.TagReader
-
readAny
public Object readAny() throws IOException
Description copied from interface:ProtoStreamReaderReads an object of an arbitrary type from this reader.- Specified by:
readAnyin interfaceProtoStreamReader- Returns:
- a supplier of the unmarshalled object
- Throws:
IOException- if the object could not be read with the associated marshaller.
-
readObject
public <T> T readObject(Class<T> targetClass) throws IOException
Description copied from interface:ProtoStreamReaderReads an object of the specified type from this reader.- Specified by:
readObjectin interfaceProtoStreamReader- Type Parameters:
T- the type of the associated marshaller- Parameters:
targetClass- the class of the associated marshaller- Returns:
- the unmarshalled object
- Throws:
IOException- if no marshaller is associated with the specified class, or if the object could not be read with the associated marshaller.
-
readInt32
@Deprecated public int readInt32() throws IOException
Deprecated.Description copied from interface:ProtoStreamReaderDeprecated to discourage use.- Specified by:
readInt32in interfaceProtoStreamReader- Specified by:
readInt32in interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
readInt32in interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
readFixed32
@Deprecated public int readFixed32() throws IOException
Deprecated.Description copied from interface:ProtoStreamReaderDeprecated to discourage use.- Specified by:
readFixed32in interfaceProtoStreamReader- Specified by:
readFixed32in interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
readFixed32in interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
readInt64
@Deprecated public long readInt64() throws IOException
Deprecated.Description copied from interface:ProtoStreamReaderDeprecated to discourage use.- Specified by:
readInt64in interfaceProtoStreamReader- Specified by:
readInt64in interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
readInt64in interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
readFixed64
@Deprecated public long readFixed64() throws IOException
Deprecated.Description copied from interface:ProtoStreamReaderDeprecated to discourage use.- Specified by:
readFixed64in interfaceProtoStreamReader- Specified by:
readFixed64in interfaceorg.infinispan.protostream.RawProtoStreamReader- Specified by:
readFixed64in interfaceorg.infinispan.protostream.TagReader- Throws:
IOException
-
-