title: Byte array of unknown length in java
body: <p>I am constructing an array of bytes in java and I don't know how long the array will be.</p>
  <p>I want some tool like Java's StringBuffer that you can just call .append(byte b) or .append(byte[] buf) and have it buffer all my bytes and return to me a byte[] when I'm done.  Is there a class that does for bytes what StringBuffer does for Strings?  It does not look like the ByteBuffer class is what I'm looking for.</p>
  <p>Anyone have a good solution?</p>