Package org.stellar.sdk.xdr
Class XdrDataOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.io.DataOutputStream
org.stellar.sdk.xdr.XdrDataOutputStream
- All Implemented Interfaces:
Closeable,DataOutput,Flushable,AutoCloseable
XDR-aware output stream that writes variable-length values with the required padding.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an XdrDataOutputStream that uses the specified underlying OutputStream. -
Method Summary
Modifier and TypeMethodDescriptionvoidwriteDoubleArray(double[] a) Writes an XDR variable-length array of doubles.voidwriteFloatArray(float[] a) Writes an XDR variable-length array of floats.voidwriteIntArray(int[] a) Writes an XDR variable-length array of integers.Methods inherited from class java.io.DataOutputStream
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTFMethods inherited from class java.io.FilterOutputStream
close, writeMethods inherited from class java.io.OutputStream
nullOutputStreamMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.io.DataOutput
write
-
Constructor Details
-
XdrDataOutputStream
Creates an XdrDataOutputStream that uses the specified underlying OutputStream.- Parameters:
out- the specified output stream
-
-
Method Details
-
writeIntArray
Writes an XDR variable-length array of integers.- Parameters:
a- the array to write- Throws:
IOException- if an I/O error occurs while writing the array
-
writeFloatArray
Writes an XDR variable-length array of floats.- Parameters:
a- the array to write- Throws:
IOException- if an I/O error occurs while writing the array
-
writeDoubleArray
Writes an XDR variable-length array of doubles.- Parameters:
a- the array to write- Throws:
IOException- if an I/O error occurs while writing the array
-