Class ByteArrayDataOutputStream

java.lang.Object
org.jgroups.util.BaseDataOutputStream
org.jgroups.util.ByteArrayDataOutputStream
All Implemented Interfaces:
DataOutput

public class ByteArrayDataOutputStream extends BaseDataOutputStream
Implements DataOutput over a byte[] buffer. The byte[] buffer expands when needed; however, it doesn't double but only expands minimally, to accommodate the additional data. It is therefore recommended to always size the buffer to the actual number of bytes needed. This class is not thread safe.
Since:
3.5
  • Field Details

    • buf

      protected byte[] buf
    • grow_exponentially

      protected boolean grow_exponentially
  • Constructor Details

    • ByteArrayDataOutputStream

      public ByteArrayDataOutputStream()
    • ByteArrayDataOutputStream

      public ByteArrayDataOutputStream(int capacity)
    • ByteArrayDataOutputStream

      public ByteArrayDataOutputStream(int capacity, boolean grow_exponentially)
  • Method Details