Class XdrDataOutputStream

All Implemented Interfaces:
Closeable, DataOutput, Flushable, AutoCloseable

public class XdrDataOutputStream extends DataOutputStream
XDR-aware output stream that writes variable-length values with the required padding.
  • Constructor Details

    • XdrDataOutputStream

      public XdrDataOutputStream(OutputStream out)
      Creates an XdrDataOutputStream that uses the specified underlying OutputStream.
      Parameters:
      out - the specified output stream
  • Method Details

    • writeIntArray

      public void writeIntArray(int[] a) throws IOException
      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

      public void writeFloatArray(float[] a) throws IOException
      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

      public void writeDoubleArray(double[] a) throws IOException
      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