Package com.mckoi.database
Class BlobStore.ClobRefImpl
- java.lang.Object
-
- com.mckoi.database.BlobStore.AbstractRef
-
- com.mckoi.database.BlobStore.ClobRefImpl
-
- All Implemented Interfaces:
ClobRef
,Ref
,StringAccessor
- Enclosing class:
- BlobStore
private class BlobStore.ClobRefImpl extends BlobStore.AbstractRef implements ClobRef
An implementation of ClobRef used to represent a reference to a large character object inside this blob store.
-
-
Field Summary
-
Fields inherited from class com.mckoi.database.BlobStore.AbstractRef
reference_id, size, type
-
-
Constructor Summary
Constructors Constructor Description ClobRefImpl(long reference_id, byte type, long size, boolean open_for_write)
Constructs the ClobRef implementation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.Reader
getReader()
Returns a Reader that allows the string to be read sequentually from start to finish.int
length()
Returns the number of characters in the string.java.lang.String
toString()
Returns this string as a java.lang.String object.-
Methods inherited from class com.mckoi.database.BlobStore.AbstractRef
assertIsOpen, close, complete, getID, getRawSize, getType, read, write
-
-
-
-
Method Detail
-
length
public int length()
Description copied from interface:StringAccessor
Returns the number of characters in the string.- Specified by:
length
in interfaceStringAccessor
- Overrides:
length
in classBlobStore.AbstractRef
-
getReader
public java.io.Reader getReader()
Description copied from interface:StringAccessor
Returns a Reader that allows the string to be read sequentually from start to finish.- Specified by:
getReader
in interfaceStringAccessor
-
toString
public java.lang.String toString()
Description copied from interface:StringAccessor
Returns this string as a java.lang.String object. Some care may be necessary with this call because a very large string will require a lot space on the heap.- Specified by:
toString
in interfaceStringAccessor
- Overrides:
toString
in classjava.lang.Object
-
-