Interface StreamingExternalizable
- All Known Implementing Classes:
ArrayTuple
,ByteByteByteTuple
,ByteByteCharTuple
,ByteByteDoubleTuple
,ByteByteFloatTuple
,ByteByteIntTuple
,ByteByteLongTuple
,ByteByteObjectTuple
,ByteByteShortTuple
,ByteByteTuple
,ByteCharByteTuple
,ByteCharCharTuple
,ByteCharDoubleTuple
,ByteCharFloatTuple
,ByteCharIntTuple
,ByteCharLongTuple
,ByteCharObjectTuple
,ByteCharShortTuple
,ByteCharTuple
,ByteDoubleByteTuple
,ByteDoubleCharTuple
,ByteDoubleDoubleTuple
,ByteDoubleFloatTuple
,ByteDoubleIntTuple
,ByteDoubleLongTuple
,ByteDoubleObjectTuple
,ByteDoubleShortTuple
,ByteDoubleTuple
,ByteFloatByteTuple
,ByteFloatCharTuple
,ByteFloatDoubleTuple
,ByteFloatFloatTuple
,ByteFloatIntTuple
,ByteFloatLongTuple
,ByteFloatObjectTuple
,ByteFloatShortTuple
,ByteFloatTuple
,ByteIntByteTuple
,ByteIntCharTuple
,ByteIntDoubleTuple
,ByteIntFloatTuple
,ByteIntIntTuple
,ByteIntLongTuple
,ByteIntObjectTuple
,ByteIntShortTuple
,ByteIntTuple
,ByteLongByteTuple
,ByteLongCharTuple
,ByteLongDoubleTuple
,ByteLongFloatTuple
,ByteLongIntTuple
,ByteLongLongTuple
,ByteLongObjectTuple
,ByteLongShortTuple
,ByteLongTuple
,ByteObjectByteTuple
,ByteObjectCharTuple
,ByteObjectDoubleTuple
,ByteObjectFloatTuple
,ByteObjectIntTuple
,ByteObjectLongTuple
,ByteObjectObjectTuple
,ByteObjectShortTuple
,ByteObjectTuple
,ByteShortByteTuple
,ByteShortCharTuple
,ByteShortDoubleTuple
,ByteShortFloatTuple
,ByteShortIntTuple
,ByteShortLongTuple
,ByteShortObjectTuple
,ByteShortShortTuple
,ByteShortTuple
,CharByteByteTuple
,CharByteCharTuple
,CharByteDoubleTuple
,CharByteFloatTuple
,CharByteIntTuple
,CharByteLongTuple
,CharByteObjectTuple
,CharByteShortTuple
,CharByteTuple
,CharCharByteTuple
,CharCharCharTuple
,CharCharDoubleTuple
,CharCharFloatTuple
,CharCharIntTuple
,CharCharLongTuple
,CharCharObjectTuple
,CharCharShortTuple
,CharCharTuple
,CharDoubleByteTuple
,CharDoubleCharTuple
,CharDoubleDoubleTuple
,CharDoubleFloatTuple
,CharDoubleIntTuple
,CharDoubleLongTuple
,CharDoubleObjectTuple
,CharDoubleShortTuple
,CharDoubleTuple
,CharFloatByteTuple
,CharFloatCharTuple
,CharFloatDoubleTuple
,CharFloatFloatTuple
,CharFloatIntTuple
,CharFloatLongTuple
,CharFloatObjectTuple
,CharFloatShortTuple
,CharFloatTuple
,CharIntByteTuple
,CharIntCharTuple
,CharIntDoubleTuple
,CharIntFloatTuple
,CharIntIntTuple
,CharIntLongTuple
,CharIntObjectTuple
,CharIntShortTuple
,CharIntTuple
,CharLongByteTuple
,CharLongCharTuple
,CharLongDoubleTuple
,CharLongFloatTuple
,CharLongIntTuple
,CharLongLongTuple
,CharLongObjectTuple
,CharLongShortTuple
,CharLongTuple
,CharObjectByteTuple
,CharObjectCharTuple
,CharObjectDoubleTuple
,CharObjectFloatTuple
,CharObjectIntTuple
,CharObjectLongTuple
,CharObjectObjectTuple
,CharObjectShortTuple
,CharObjectTuple
,CharShortByteTuple
,CharShortCharTuple
,CharShortDoubleTuple
,CharShortFloatTuple
,CharShortIntTuple
,CharShortLongTuple
,CharShortObjectTuple
,CharShortShortTuple
,CharShortTuple
,DoubleByteByteTuple
,DoubleByteCharTuple
,DoubleByteDoubleTuple
,DoubleByteFloatTuple
,DoubleByteIntTuple
,DoubleByteLongTuple
,DoubleByteObjectTuple
,DoubleByteShortTuple
,DoubleByteTuple
,DoubleCharByteTuple
,DoubleCharCharTuple
,DoubleCharDoubleTuple
,DoubleCharFloatTuple
,DoubleCharIntTuple
,DoubleCharLongTuple
,DoubleCharObjectTuple
,DoubleCharShortTuple
,DoubleCharTuple
,DoubleDoubleByteTuple
,DoubleDoubleCharTuple
,DoubleDoubleDoubleTuple
,DoubleDoubleFloatTuple
,DoubleDoubleIntTuple
,DoubleDoubleLongTuple
,DoubleDoubleObjectTuple
,DoubleDoubleShortTuple
,DoubleDoubleTuple
,DoubleFloatByteTuple
,DoubleFloatCharTuple
,DoubleFloatDoubleTuple
,DoubleFloatFloatTuple
,DoubleFloatIntTuple
,DoubleFloatLongTuple
,DoubleFloatObjectTuple
,DoubleFloatShortTuple
,DoubleFloatTuple
,DoubleIntByteTuple
,DoubleIntCharTuple
,DoubleIntDoubleTuple
,DoubleIntFloatTuple
,DoubleIntIntTuple
,DoubleIntLongTuple
,DoubleIntObjectTuple
,DoubleIntShortTuple
,DoubleIntTuple
,DoubleLongByteTuple
,DoubleLongCharTuple
,DoubleLongDoubleTuple
,DoubleLongFloatTuple
,DoubleLongIntTuple
,DoubleLongLongTuple
,DoubleLongObjectTuple
,DoubleLongShortTuple
,DoubleLongTuple
,DoubleObjectByteTuple
,DoubleObjectCharTuple
,DoubleObjectDoubleTuple
,DoubleObjectFloatTuple
,DoubleObjectIntTuple
,DoubleObjectLongTuple
,DoubleObjectObjectTuple
,DoubleObjectShortTuple
,DoubleObjectTuple
,DoubleShortByteTuple
,DoubleShortCharTuple
,DoubleShortDoubleTuple
,DoubleShortFloatTuple
,DoubleShortIntTuple
,DoubleShortLongTuple
,DoubleShortObjectTuple
,DoubleShortShortTuple
,DoubleShortTuple
,FloatByteByteTuple
,FloatByteCharTuple
,FloatByteDoubleTuple
,FloatByteFloatTuple
,FloatByteIntTuple
,FloatByteLongTuple
,FloatByteObjectTuple
,FloatByteShortTuple
,FloatByteTuple
,FloatCharByteTuple
,FloatCharCharTuple
,FloatCharDoubleTuple
,FloatCharFloatTuple
,FloatCharIntTuple
,FloatCharLongTuple
,FloatCharObjectTuple
,FloatCharShortTuple
,FloatCharTuple
,FloatDoubleByteTuple
,FloatDoubleCharTuple
,FloatDoubleDoubleTuple
,FloatDoubleFloatTuple
,FloatDoubleIntTuple
,FloatDoubleLongTuple
,FloatDoubleObjectTuple
,FloatDoubleShortTuple
,FloatDoubleTuple
,FloatFloatByteTuple
,FloatFloatCharTuple
,FloatFloatDoubleTuple
,FloatFloatFloatTuple
,FloatFloatIntTuple
,FloatFloatLongTuple
,FloatFloatObjectTuple
,FloatFloatShortTuple
,FloatFloatTuple
,FloatIntByteTuple
,FloatIntCharTuple
,FloatIntDoubleTuple
,FloatIntFloatTuple
,FloatIntIntTuple
,FloatIntLongTuple
,FloatIntObjectTuple
,FloatIntShortTuple
,FloatIntTuple
,FloatLongByteTuple
,FloatLongCharTuple
,FloatLongDoubleTuple
,FloatLongFloatTuple
,FloatLongIntTuple
,FloatLongLongTuple
,FloatLongObjectTuple
,FloatLongShortTuple
,FloatLongTuple
,FloatObjectByteTuple
,FloatObjectCharTuple
,FloatObjectDoubleTuple
,FloatObjectFloatTuple
,FloatObjectIntTuple
,FloatObjectLongTuple
,FloatObjectObjectTuple
,FloatObjectShortTuple
,FloatObjectTuple
,FloatShortByteTuple
,FloatShortCharTuple
,FloatShortDoubleTuple
,FloatShortFloatTuple
,FloatShortIntTuple
,FloatShortLongTuple
,FloatShortObjectTuple
,FloatShortShortTuple
,FloatShortTuple
,IntByteByteTuple
,IntByteCharTuple
,IntByteDoubleTuple
,IntByteFloatTuple
,IntByteIntTuple
,IntByteLongTuple
,IntByteObjectTuple
,IntByteShortTuple
,IntByteTuple
,IntCharByteTuple
,IntCharCharTuple
,IntCharDoubleTuple
,IntCharFloatTuple
,IntCharIntTuple
,IntCharLongTuple
,IntCharObjectTuple
,IntCharShortTuple
,IntCharTuple
,IntDoubleByteTuple
,IntDoubleCharTuple
,IntDoubleDoubleTuple
,IntDoubleFloatTuple
,IntDoubleIntTuple
,IntDoubleLongTuple
,IntDoubleObjectTuple
,IntDoubleShortTuple
,IntDoubleTuple
,IntFloatByteTuple
,IntFloatCharTuple
,IntFloatDoubleTuple
,IntFloatFloatTuple
,IntFloatIntTuple
,IntFloatLongTuple
,IntFloatObjectTuple
,IntFloatShortTuple
,IntFloatTuple
,IntIntByteTuple
,IntIntCharTuple
,IntIntDoubleTuple
,IntIntFloatTuple
,IntIntIntTuple
,IntIntLongTuple
,IntIntObjectTuple
,IntIntShortTuple
,IntIntTuple
,IntLongByteTuple
,IntLongCharTuple
,IntLongDoubleTuple
,IntLongFloatTuple
,IntLongIntTuple
,IntLongLongTuple
,IntLongObjectTuple
,IntLongShortTuple
,IntLongTuple
,IntObjectByteTuple
,IntObjectCharTuple
,IntObjectDoubleTuple
,IntObjectFloatTuple
,IntObjectIntTuple
,IntObjectLongTuple
,IntObjectObjectTuple
,IntObjectShortTuple
,IntObjectTuple
,IntShortByteTuple
,IntShortCharTuple
,IntShortDoubleTuple
,IntShortFloatTuple
,IntShortIntTuple
,IntShortLongTuple
,IntShortObjectTuple
,IntShortShortTuple
,IntShortTuple
,LongByteByteTuple
,LongByteCharTuple
,LongByteDoubleTuple
,LongByteFloatTuple
,LongByteIntTuple
,LongByteLongTuple
,LongByteObjectTuple
,LongByteShortTuple
,LongByteTuple
,LongCharByteTuple
,LongCharCharTuple
,LongCharDoubleTuple
,LongCharFloatTuple
,LongCharIntTuple
,LongCharLongTuple
,LongCharObjectTuple
,LongCharShortTuple
,LongCharTuple
,LongDoubleByteTuple
,LongDoubleCharTuple
,LongDoubleDoubleTuple
,LongDoubleFloatTuple
,LongDoubleIntTuple
,LongDoubleLongTuple
,LongDoubleObjectTuple
,LongDoubleShortTuple
,LongDoubleTuple
,LongFloatByteTuple
,LongFloatCharTuple
,LongFloatDoubleTuple
,LongFloatFloatTuple
,LongFloatIntTuple
,LongFloatLongTuple
,LongFloatObjectTuple
,LongFloatShortTuple
,LongFloatTuple
,LongIntByteTuple
,LongIntCharTuple
,LongIntDoubleTuple
,LongIntFloatTuple
,LongIntIntTuple
,LongIntLongTuple
,LongIntObjectTuple
,LongIntShortTuple
,LongIntTuple
,LongLongByteTuple
,LongLongCharTuple
,LongLongDoubleTuple
,LongLongFloatTuple
,LongLongIntTuple
,LongLongLongTuple
,LongLongObjectTuple
,LongLongShortTuple
,LongLongTuple
,LongObjectByteTuple
,LongObjectCharTuple
,LongObjectDoubleTuple
,LongObjectFloatTuple
,LongObjectIntTuple
,LongObjectLongTuple
,LongObjectObjectTuple
,LongObjectShortTuple
,LongObjectTuple
,LongShortByteTuple
,LongShortCharTuple
,LongShortDoubleTuple
,LongShortFloatTuple
,LongShortIntTuple
,LongShortLongTuple
,LongShortObjectTuple
,LongShortShortTuple
,LongShortTuple
,ObjectByteByteTuple
,ObjectByteCharTuple
,ObjectByteDoubleTuple
,ObjectByteFloatTuple
,ObjectByteIntTuple
,ObjectByteLongTuple
,ObjectByteObjectTuple
,ObjectByteShortTuple
,ObjectByteTuple
,ObjectCharByteTuple
,ObjectCharCharTuple
,ObjectCharDoubleTuple
,ObjectCharFloatTuple
,ObjectCharIntTuple
,ObjectCharLongTuple
,ObjectCharObjectTuple
,ObjectCharShortTuple
,ObjectCharTuple
,ObjectDoubleByteTuple
,ObjectDoubleCharTuple
,ObjectDoubleDoubleTuple
,ObjectDoubleFloatTuple
,ObjectDoubleIntTuple
,ObjectDoubleLongTuple
,ObjectDoubleObjectTuple
,ObjectDoubleShortTuple
,ObjectDoubleTuple
,ObjectFloatByteTuple
,ObjectFloatCharTuple
,ObjectFloatDoubleTuple
,ObjectFloatFloatTuple
,ObjectFloatIntTuple
,ObjectFloatLongTuple
,ObjectFloatObjectTuple
,ObjectFloatShortTuple
,ObjectFloatTuple
,ObjectIntByteTuple
,ObjectIntCharTuple
,ObjectIntDoubleTuple
,ObjectIntFloatTuple
,ObjectIntIntTuple
,ObjectIntLongTuple
,ObjectIntObjectTuple
,ObjectIntShortTuple
,ObjectIntTuple
,ObjectLongByteTuple
,ObjectLongCharTuple
,ObjectLongDoubleTuple
,ObjectLongFloatTuple
,ObjectLongIntTuple
,ObjectLongLongTuple
,ObjectLongObjectTuple
,ObjectLongShortTuple
,ObjectLongTuple
,ObjectObjectByteTuple
,ObjectObjectCharTuple
,ObjectObjectDoubleTuple
,ObjectObjectFloatTuple
,ObjectObjectIntTuple
,ObjectObjectLongTuple
,ObjectObjectObjectTuple
,ObjectObjectShortTuple
,ObjectObjectTuple
,ObjectShortByteTuple
,ObjectShortCharTuple
,ObjectShortDoubleTuple
,ObjectShortFloatTuple
,ObjectShortIntTuple
,ObjectShortLongTuple
,ObjectShortObjectTuple
,ObjectShortShortTuple
,ObjectShortTuple
,ShortByteByteTuple
,ShortByteCharTuple
,ShortByteDoubleTuple
,ShortByteFloatTuple
,ShortByteIntTuple
,ShortByteLongTuple
,ShortByteObjectTuple
,ShortByteShortTuple
,ShortByteTuple
,ShortCharByteTuple
,ShortCharCharTuple
,ShortCharDoubleTuple
,ShortCharFloatTuple
,ShortCharIntTuple
,ShortCharLongTuple
,ShortCharObjectTuple
,ShortCharShortTuple
,ShortCharTuple
,ShortDoubleByteTuple
,ShortDoubleCharTuple
,ShortDoubleDoubleTuple
,ShortDoubleFloatTuple
,ShortDoubleIntTuple
,ShortDoubleLongTuple
,ShortDoubleObjectTuple
,ShortDoubleShortTuple
,ShortDoubleTuple
,ShortFloatByteTuple
,ShortFloatCharTuple
,ShortFloatDoubleTuple
,ShortFloatFloatTuple
,ShortFloatIntTuple
,ShortFloatLongTuple
,ShortFloatObjectTuple
,ShortFloatShortTuple
,ShortFloatTuple
,ShortIntByteTuple
,ShortIntCharTuple
,ShortIntDoubleTuple
,ShortIntFloatTuple
,ShortIntIntTuple
,ShortIntLongTuple
,ShortIntObjectTuple
,ShortIntShortTuple
,ShortIntTuple
,ShortLongByteTuple
,ShortLongCharTuple
,ShortLongDoubleTuple
,ShortLongFloatTuple
,ShortLongIntTuple
,ShortLongLongTuple
,ShortLongObjectTuple
,ShortLongShortTuple
,ShortLongTuple
,ShortObjectByteTuple
,ShortObjectCharTuple
,ShortObjectDoubleTuple
,ShortObjectFloatTuple
,ShortObjectIntTuple
,ShortObjectLongTuple
,ShortObjectObjectTuple
,ShortObjectShortTuple
,ShortObjectTuple
,ShortShortByteTuple
,ShortShortCharTuple
,ShortShortDoubleTuple
,ShortShortFloatTuple
,ShortShortIntTuple
,ShortShortLongTuple
,ShortShortObjectTuple
,ShortShortShortTuple
,ShortShortTuple
public interface StreamingExternalizable
Externalizable
for writing in streaming fashion.-
Method Summary
Modifier and Type Method Description default <TYPE extends StreamingExternalizable>
TYPEinitializeExternalStreaming(ObjectInput in, gnu.trove.map.TIntObjectMap<SerializationUtils.Reader> cachedReaders)
Convenience method to allow chaining of construction and calls toreadExternalStreaming(ObjectInput, TIntObjectMap)
.void
readExternalStreaming(ObjectInput in, gnu.trove.map.TIntObjectMap<SerializationUtils.Reader> cachedReaders)
Alternative toExternalizable.readExternal(ObjectInput)
for use when a series of tuples of the same type with the same element types are being read in iterative fashion.static <ITEM_TYPE>
ITEM_TYPEreadObjectElement(ObjectInput in, gnu.trove.map.TIntObjectMap<SerializationUtils.Reader> cachedReaders, int itemIndex)
Implement the Object element reading protocol described inreadExternalStreaming(ObjectInput, TIntObjectMap)
.void
writeExternalStreaming(ObjectOutput out, gnu.trove.map.TIntObjectMap<SerializationUtils.Writer> cachedWriters)
Alternative toExternalizable.writeExternal(ObjectOutput)
for use when a series of tuples of the same type with the same element types are being written in iterative fashion.static <ITEM_TYPE>
voidwriteObjectElement(ObjectOutput out, gnu.trove.map.TIntObjectMap<SerializationUtils.Writer> cachedWriters, int itemIndex, ITEM_TYPE item)
Implement the Object element writing protocol described inwriteExternalStreaming(ObjectOutput, TIntObjectMap)
.
-
Method Details
-
writeExternalStreaming
void writeExternalStreaming(@NotNull ObjectOutput out, @NotNull gnu.trove.map.TIntObjectMap<SerializationUtils.Writer> cachedWriters) throws IOExceptionAlternative to
Externalizable.writeExternal(ObjectOutput)
for use when a series of tuples of the same type with the same element types are being written in iterative fashion.Primitive elements should be written with their primitive write methods (e.g.
DataOutput.writeInt(int)
).Object elements are preceded by a boolean, true if null, false otherwise. The first non-null value for a given Object element is then preceded by the name of the class. All non-null values are then written with a writer method from
SerializationUtils.getWriter(Class, ObjectOutput)
, cached in cachedWriters.- Parameters:
out
- The outputcachedWriters
- The cached writers- Throws:
IOException
-
writeObjectElement
static <ITEM_TYPE> void writeObjectElement(@NotNull ObjectOutput out, @NotNull gnu.trove.map.TIntObjectMap<SerializationUtils.Writer> cachedWriters, int itemIndex, @Nullable ITEM_TYPE item) throws IOExceptionImplement the Object element writing protocol described inwriteExternalStreaming(ObjectOutput, TIntObjectMap)
.- Parameters:
out
- The outputcachedWriters
- The cached writersitemIndex
- The index into the cached writers for this itemitem
- The item to write- Throws:
IOException
-
readExternalStreaming
void readExternalStreaming(@NotNull ObjectInput in, @NotNull gnu.trove.map.TIntObjectMap<SerializationUtils.Reader> cachedReaders) throws ExceptionAlternative to
Externalizable.readExternal(ObjectInput)
for use when a series of tuples of the same type with the same element types are being read in iterative fashion.Primitive elements should be read with their primitive read methods (e.g.
DataInput.readInt()
).Object elements are preceded by a boolean, true if null, false otherwise. The first non-null value for a given Object element is then preceded by the name of the class. All non-null values are then read with a reader method from
SerializationUtils.getReader(Class, ObjectInput)
, cached in cachedReaders.- Parameters:
in
- The inputcachedReaders
- The cached readers- Throws:
Exception
-
initializeExternalStreaming
default <TYPE extends StreamingExternalizable> TYPE initializeExternalStreaming(@NotNull ObjectInput in, @NotNull gnu.trove.map.TIntObjectMap<SerializationUtils.Reader> cachedReaders) throws ExceptionConvenience method to allow chaining of construction and calls toreadExternalStreaming(ObjectInput, TIntObjectMap)
.- Parameters:
in
- The inputcachedReaders
- The cached readers- Returns:
- this
- Throws:
Exception
-
readObjectElement
static <ITEM_TYPE> ITEM_TYPE readObjectElement(@NotNull ObjectInput in, @NotNull gnu.trove.map.TIntObjectMap<SerializationUtils.Reader> cachedReaders, int itemIndex) throws ExceptionImplement the Object element reading protocol described inreadExternalStreaming(ObjectInput, TIntObjectMap)
.- Parameters:
in
- The inputcachedReaders
- The cached readersitemIndex
- The index into the cached readers for this item- Throws:
Exception
-