Package com.db4o.internal.encoding
Class DelegatingStringIO
- java.lang.Object
-
- com.db4o.internal.encoding.LatinStringIO
-
- com.db4o.internal.encoding.DelegatingStringIO
-
public class DelegatingStringIO extends LatinStringIO
-
-
Constructor Summary
Constructors Constructor Description DelegatingStringIO(StringEncoding encoding)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte
encodingByte()
int
length(java.lang.String str)
java.lang.String
read(byte[] bytes)
java.lang.String
read(ReadBuffer buffer, int length)
int
shortLength(java.lang.String str)
void
write(WriteBuffer buffer, java.lang.String str)
byte[]
write(java.lang.String str)
void
writeLengthAndString(WriteBuffer buffer, java.lang.String str)
Note the different implementation when compared to LatinStringIO and UnicodeStringIO: Instead of writing the length of the string, UTF8StringIO writes the length of the byte array.-
Methods inherited from class com.db4o.internal.encoding.LatinStringIO
bytes, bytesPerChar, readLengthAndString
-
-
-
-
Constructor Detail
-
DelegatingStringIO
public DelegatingStringIO(StringEncoding encoding)
-
-
Method Detail
-
encodingByte
public byte encodingByte()
- Overrides:
encodingByte
in classLatinStringIO
-
length
public int length(java.lang.String str)
- Overrides:
length
in classLatinStringIO
-
read
public java.lang.String read(ReadBuffer buffer, int length)
- Overrides:
read
in classLatinStringIO
-
read
public java.lang.String read(byte[] bytes)
- Overrides:
read
in classLatinStringIO
-
shortLength
public int shortLength(java.lang.String str)
- Overrides:
shortLength
in classLatinStringIO
-
write
public void write(WriteBuffer buffer, java.lang.String str)
- Overrides:
write
in classLatinStringIO
-
write
public byte[] write(java.lang.String str)
- Overrides:
write
in classLatinStringIO
-
writeLengthAndString
public void writeLengthAndString(WriteBuffer buffer, java.lang.String str)
Note the different implementation when compared to LatinStringIO and UnicodeStringIO: Instead of writing the length of the string, UTF8StringIO writes the length of the byte array.- Overrides:
writeLengthAndString
in classLatinStringIO
-
-