public class StreamImpl extends Object implements SDTStreamIF, SDTSerializable
| Constructor and Description |
|---|
StreamImpl() |
StreamImpl(int capacity) |
StreamImpl(StreamTLVBuffer buffer)
For Read-Only streams
|
| Modifier and Type | Method and Description |
|---|---|
ByteArray |
asByteArray() |
void |
clear()
Clears the current contents of the stream.
|
boolean |
equals(Object obj) |
long |
getVersion() |
int |
hashCode() |
boolean |
hasRemaining()
Returns true if there is more to be read on the stream.
|
void |
mark()
Marks the current read pointer for later use by reset().
|
Object |
read()
Reads the next object on the stream.
|
Boolean |
readBoolean()
Reads a Boolean from a Stream.
|
Byte |
readByte()
Reads a Byte from a Stream.
|
ByteArray |
readByteArray() |
byte[] |
readBytes()
Reads a byte[] from a Stream.
|
Character |
readCharacter()
Reads a Character from a Stream.
|
Destination |
readDestination()
Reads a Destination from a Stream.
|
Double |
readDouble()
Reads a Double from a Stream.
|
Float |
readFloat()
Reads a Float from a Stream.
|
Integer |
readInteger()
Reads an Integer from a Stream.
|
Long |
readLong()
Reads a Long from a Stream.
|
SDTMap |
readMap()
Reads a SDTMap from a Stream.
|
RawSMFMessage |
readMessage()
SolReserved - Reads a RawSMFMessage from a Stream.
|
Short |
readShort()
Reads a Short from a Stream.
|
SDTStream |
readStream()
Reads a SDTStream from a Stream.
|
String |
readString()
Reads a String from a Stream.
|
void |
reset()
Resets the read pointer to the last position saved by mark().
|
void |
rewind()
Rewinds the read pointer to the beginning of the stream.
|
void |
serialize(TLVBuffer buffer) |
void |
setFormatter(Formatter fmter) |
String |
toString() |
void |
writeBoolean(Boolean value)
Writes a Boolean to a stream.
|
void |
writeByte(Byte value)
Writes a Byte to a stream.
|
void |
writeByteArray(ByteArray value) |
void |
writeBytes(byte[] value)
Writes a byte[] to a stream.
|
void |
writeBytes(byte[] value,
int offset,
int length)
Writes a byte[] to a stream.
|
void |
writeCharacter(Character value)
Writes a Character to a stream.
|
void |
writeDestination(Destination value)
Writes a Destination to a stream.
|
void |
writeDouble(Double value)
Writes a Double to a stream.
|
void |
writeFloat(Float value)
Writes a Float to a stream.
|
void |
writeInteger(Integer value)
Writes an Integer to a stream.
|
void |
writeLong(Long value)
Writes a Long to a stream.
|
void |
writeMap(SDTMap value)
Writes a SDTMap to a stream.
|
void |
writeMessage(RawSMFMessage value)
SolReserved - Writes a RawSMFMessage to a stream.
|
void |
writeObject(Object value)
Writes an Object to a stream.
|
void |
writeShort(Short value)
Writes a Short to a stream.
|
void |
writeStream(SDTStream value)
Writes a SDTStream to a stream.
|
void |
writeString(String value)
Writes a String to a stream.
|
public StreamImpl()
public StreamImpl(int capacity)
public StreamImpl(StreamTLVBuffer buffer)
buffer - parameterpublic void serialize(TLVBuffer buffer)
serialize in interface SDTSerializablepublic long getVersion()
public void setFormatter(Formatter fmter)
setFormatter in interface SDTStreamIFpublic void clear()
SDTStreampublic ByteArray asByteArray()
asByteArray in interface SDTStreamIFpublic void mark()
SDTStreampublic void reset()
SDTStreampublic void rewind()
SDTStreampublic boolean hasRemaining()
SDTStreamhasRemaining in interface SDTStreampublic Object read() throws SDTException
SDTStreamread in interface SDTStreamSDTException - If unable to read a value because of some internal reason.SDTEOFException - If unable to read because end of stream reached.public Boolean readBoolean() throws SDTException
SDTStreamreadBoolean in interface SDTStreamSDTException - If unable to read a value due to some internal reason.SDTEOFException - If unable to read because end of stream reached.SDTFormatException - if this type conversion is invalid.public Byte readByte() throws SDTException
SDTStreamreadByte in interface SDTStreamSDTException - If unable to read a value due to some internal reason.SDTEOFException - If unable to read because end of stream reached.SDTFormatException - If this type conversion is invalid.public byte[] readBytes()
throws SDTException
SDTStreamreadBytes in interface SDTStreamSDTException - If unable to read a value due to some internal reason.SDTEOFException - If unable to read because end of stream reached.SDTFormatException - If this type conversion is invalid.public ByteArray readByteArray() throws SDTException
readByteArray in interface SDTStreamSDTExceptionpublic Character readCharacter() throws SDTException
SDTStreamreadCharacter in interface SDTStreamSDTException - If unable to read a value due to some internal reason.SDTEOFException - If unable to read because end of stream reached.SDTFormatException - If this type conversion is invalid.public Destination readDestination() throws SDTException
SDTStreamreadDestination in interface SDTStreamSDTException - If unable to read a value due to some internal reason.SDTEOFException - If unable to read because end of stream reached.SDTFormatException - If this type conversion is invalid.public Double readDouble() throws SDTException
SDTStreamreadDouble in interface SDTStreamSDTException - If unable to read a value due to some internal reason.SDTEOFException - If unable to read because end of stream reached.SDTFormatException - If this type conversion is invalid.public Float readFloat() throws SDTException
SDTStreamreadFloat in interface SDTStreamSDTException - If unable to read a value due to some internal reason.SDTEOFException - If unable to read because end of stream reached.SDTFormatException - If this type conversion is invalid.public Integer readInteger() throws SDTException
SDTStreamreadInteger in interface SDTStreamSDTException - If unable to read a value due to some internal reason.SDTEOFException - If unable to read because end of stream reached.SDTFormatException - If this type conversion is invalid.public Long readLong() throws SDTException
SDTStreamreadLong in interface SDTStreamSDTException - If unable to read a value due to some internal reason.SDTEOFException - If unable to read because end of stream reached.SDTFormatException - If this type conversion is invalid.public SDTMap readMap() throws SDTException
SDTStreamreadMap in interface SDTStreamSDTException - If unable to read a value due to some internal reason.SDTEOFException - If unable to read because end of stream reached.SDTFormatException - If this type conversion is invalid.public RawSMFMessage readMessage() throws SDTException
SDTStreamreadMessage in interface SDTStreamSDTException - If unable to read a value due to some internal reason.SDTEOFException - If unable to read because end of stream reached.SDTFormatException - If this type conversion is invalid.public Short readShort() throws SDTException
SDTStreamreadShort in interface SDTStreamSDTException - If unable to read a value due to some internal reason.SDTEOFException - If unable to read because end of stream reached.SDTFormatException - If this type conversion is invalid.public SDTStream readStream() throws SDTException
SDTStreamreadStream in interface SDTStreamSDTException - If unable to read a value due to some internal reason.SDTEOFException - If unable to read because end of stream reached.SDTFormatException - If this type conversion is invalid.public String readString() throws SDTException
SDTStreamreadString in interface SDTStreamSDTException - If unable to read a value due to some internal reason.SDTEOFException - If unable to read because end of stream reached.SDTFormatException - If this type conversion is invalid.public void writeBoolean(Boolean value)
SDTStreamwriteBoolean in interface SDTStreamvalue - The value to write. This can be null.public void writeByte(Byte value)
SDTStreampublic void writeBytes(byte[] value)
SDTStreamwriteBytes in interface SDTStreamvalue - The value to write. This can be null.public void writeBytes(byte[] value,
int offset,
int length)
SDTStreamwriteBytes in interface SDTStreamvalue - The value to write. This can be null.public void writeByteArray(ByteArray value)
writeByteArray in interface SDTStreampublic void writeCharacter(Character value)
SDTStreamwriteCharacter in interface SDTStreamvalue - The value to write. This can be null.public void writeDestination(Destination value)
SDTStreamwriteDestination in interface SDTStreamvalue - The value to write. This can be null.public void writeDouble(Double value)
SDTStreamwriteDouble in interface SDTStreamvalue - The value to write. This can be null.public void writeFloat(Float value)
SDTStreamwriteFloat in interface SDTStreamvalue - The value to write. This can be null.public void writeInteger(Integer value)
SDTStreamwriteInteger in interface SDTStreamvalue - The value to write. This can be null.public void writeLong(Long value)
SDTStreampublic void writeMap(SDTMap value)
SDTStreampublic void writeMessage(RawSMFMessage value)
SDTStreamwriteMessage in interface SDTStreamvalue - The value to write. This can be null.public void writeObject(Object value)
SDTStreamIllegalArgumentException if the
Object argument is not one of the supported data types.writeObject in interface SDTStreamvalue - The value to write. This can be null.public void writeShort(Short value)
SDTStreamwriteShort in interface SDTStreamvalue - The value to write. This can be null.public void writeStream(SDTStream value)
SDTStreamwriteStream in interface SDTStreamvalue - The value to write. This can be null.public void writeString(String value)
SDTStreamwriteString in interface SDTStreamvalue - The value to write. This can be null.Copyright 2004-2021 Solace Corporation. All rights reserved.