Package com.nuodb.jdbc
Class EncodedDataStream
- java.lang.Object
-
- com.nuodb.impl.util.DataStream
-
- com.nuodb.jdbc.EncodedDataStream
-
- All Implemented Interfaces:
TimeValues,Iterable<com.nuodb.impl.util.DataStream.Segment>
- Direct Known Subclasses:
RemEncodedStream
public class EncodedDataStream extends com.nuodb.impl.util.DataStream implements TimeValues
-
-
Field Summary
-
Fields inherited from interface com.nuodb.jdbc.TimeValues
MILLISECONDS_PER_DAY, MILLISECONDS_PER_HOUR, MILLISECONDS_PER_MINUTE, MILLISECONDS_SCALE, NANOSECONDS_SCALE, SECONDS_PER_DAY, SECONDS_PER_HOUR, SECONDS_PER_MINUTE, SECONDS_SCALE
-
-
Constructor Summary
Constructors Constructor Description EncodedDataStream()EncodedDataStream(int protocolVersion)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecode()intdecode(byte[] source, int sourceOffset)voidencodeArray(Array value)voidencodeBigDecimal(BigDecimal bd)voidencodeBoolean(boolean value)voidencodeByte(byte value)voidencodeBytes(byte[] value)voidencodeDate(Date date)voidencodeDouble(double dbl)voidencodeInt(int value)voidencodeLong(long value)voidencodeLong(long value, int scale)voidencodeNull()voidencodeObject(Object obj)voidencodeOldBigDecimal(BigDecimal bd)voidencodeOutParameter(int index, com.nuodb.jdbc.RemCallableStatement.OutParameter param)voidencodeScaledDate(Date date)voidencodeScaledTime(Time time)voidencodeScaledTimestamp(Timestamp val)voidencodeString(String string)voidencodeTime(Time time)voidencodeTimestamp(Timestamp val)booleangetBoolean()byte[]getBytes()voidgetMessage(com.nuodb.impl.net.CryptoInputStream stream)voidgetMessage(com.nuodb.impl.net.CryptoInputStream stream, Long maxLength)intgetProtocolVersion()StringgetString()UUIDgetUUId()booleanisEndOfMessage()intsetBase64(char[] data, int dataOffset, int length)voidsetData(byte[] data, int offset, int length)voidsetProtocolVersion(int protocolVersion)voidstartMessage(int messageType)voidwrite(byte[] b)-
Methods inherited from class com.nuodb.impl.util.DataStream
getBuffer, getString, iterator, putBase64, readString, reset, send, write, write, write
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
setProtocolVersion
public void setProtocolVersion(int protocolVersion)
-
getProtocolVersion
public int getProtocolVersion()
-
startMessage
public void startMessage(int messageType)
-
write
public void write(byte[] b)
-
encodeOutParameter
public void encodeOutParameter(int index, com.nuodb.jdbc.RemCallableStatement.OutParameter param)
-
encodeInt
public void encodeInt(int value)
-
encodeBoolean
public void encodeBoolean(boolean value)
-
encodeLong
public void encodeLong(long value)
-
encodeLong
public void encodeLong(long value, int scale)
-
encodeString
public void encodeString(String string) throws SQLException
- Throws:
SQLException
-
encodeBytes
public void encodeBytes(byte[] value) throws SQLException- Throws:
SQLException
-
encodeObject
public void encodeObject(Object obj) throws SQLException
- Throws:
SQLException
-
encodeArray
public void encodeArray(Array value) throws SQLException
- Throws:
SQLException
-
encodeByte
public void encodeByte(byte value)
-
encodeTimestamp
public void encodeTimestamp(Timestamp val) throws SQLException
- Throws:
SQLException
-
encodeScaledTimestamp
public void encodeScaledTimestamp(Timestamp val) throws SQLException
- Throws:
SQLException
-
decode
public void decode() throws SQLException- Throws:
SQLException
-
decode
public int decode(byte[] source, int sourceOffset) throws SQLException- Throws:
SQLException
-
getString
public String getString() throws SQLException
- Throws:
SQLException
-
getUUId
public UUID getUUId() throws SQLException
- Throws:
SQLException
-
getBoolean
public boolean getBoolean() throws SQLException- Throws:
SQLException
-
getBytes
public byte[] getBytes() throws SQLException- Throws:
SQLException
-
encodeNull
public void encodeNull()
-
isEndOfMessage
public boolean isEndOfMessage()
-
encodeDate
public void encodeDate(Date date)
-
encodeScaledDate
public void encodeScaledDate(Date date)
-
encodeDouble
public void encodeDouble(double dbl)
-
encodeBigDecimal
public void encodeBigDecimal(BigDecimal bd)
-
encodeOldBigDecimal
public void encodeOldBigDecimal(BigDecimal bd)
-
encodeTime
public void encodeTime(Time time) throws SQLException
- Throws:
SQLException
-
encodeScaledTime
public void encodeScaledTime(Time time)
-
getMessage
public void getMessage(com.nuodb.impl.net.CryptoInputStream stream) throws IOException- Overrides:
getMessagein classcom.nuodb.impl.util.DataStream- Throws:
IOException
-
getMessage
public void getMessage(com.nuodb.impl.net.CryptoInputStream stream, Long maxLength) throws IOException- Overrides:
getMessagein classcom.nuodb.impl.util.DataStream- Throws:
IOException
-
setData
public void setData(byte[] data, int offset, int length)- Overrides:
setDatain classcom.nuodb.impl.util.DataStream
-
setBase64
public int setBase64(char[] data, int dataOffset, int length)- Overrides:
setBase64in classcom.nuodb.impl.util.DataStream
-
-