Package org.mapdb.elsa
Class ElsaObjectOutputStream
java.lang.Object
java.io.OutputStream
org.mapdb.elsa.ElsaObjectOutputStream
- All Implemented Interfaces:
Closeable,DataOutput,Flushable,ObjectOutput,AutoCloseable
Wraps DataOutput and Elsa Serializer and provides
OutputStream and ObjectOutput.
This is an alternative to ObjectOutputStream.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionElsaObjectOutputStream(DataOutput out, ElsaSerializerPojo serializer) Takes DataOutput and Elsa SerializerTakes OutputStream and use default Elsa settings to construct new serializer -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidwrite(int b) voidwriteBoolean(boolean v) voidwriteByte(int v) voidwriteBytes(String s) voidwriteChar(int v) voidwriteChars(String s) voidwriteDouble(double v) voidwriteFloat(float v) voidwriteInt(int v) voidwriteLong(long v) voidwriteObject(Object obj) voidwriteShort(int v) voidMethods inherited from class java.io.OutputStream
flush, write, writeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.io.ObjectOutput
flush, write, write
-
Field Details
-
out
-
serializer
-
-
Constructor Details
-
ElsaObjectOutputStream
Takes DataOutput and Elsa Serializer- Parameters:
out- DataOutput, serialized data are written hereserializer- serializer which converts objects into binary form- Throws:
IOException- an exception from underlying stream
-
ElsaObjectOutputStream
Takes OutputStream and use default Elsa settings to construct new serializer- Parameters:
out- OutputStream, serialized data are written here- Throws:
IOException- an exception from underlying stream
-
-
Method Details
-
writeObject
- Specified by:
writeObjectin interfaceObjectOutput- Throws:
IOException
-
write
- Specified by:
writein interfaceDataOutput- Specified by:
writein interfaceObjectOutput- Specified by:
writein classOutputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceObjectOutput- Overrides:
closein classOutputStream- Throws:
IOException
-
writeBoolean
- Specified by:
writeBooleanin interfaceDataOutput- Throws:
IOException
-
writeByte
- Specified by:
writeBytein interfaceDataOutput- Throws:
IOException
-
writeShort
- Specified by:
writeShortin interfaceDataOutput- Throws:
IOException
-
writeChar
- Specified by:
writeCharin interfaceDataOutput- Throws:
IOException
-
writeInt
- Specified by:
writeIntin interfaceDataOutput- Throws:
IOException
-
writeLong
- Specified by:
writeLongin interfaceDataOutput- Throws:
IOException
-
writeFloat
- Specified by:
writeFloatin interfaceDataOutput- Throws:
IOException
-
writeDouble
- Specified by:
writeDoublein interfaceDataOutput- Throws:
IOException
-
writeBytes
- Specified by:
writeBytesin interfaceDataOutput- Throws:
IOException
-
writeChars
- Specified by:
writeCharsin interfaceDataOutput- Throws:
IOException
-
writeUTF
- Specified by:
writeUTFin interfaceDataOutput- Throws:
IOException
-