code: byte[] toNewByteArray()
      {
          int length = myBuffer.length - myOffset;
          byte[] bytes = new byte[length];
          System.arraycopy(myBuffer, myOffset, bytes, 0, length);
          return bytes;
      }
docs: Copies the current contents of the Ion binary-encoded byte array into a
  new byte array. The allocates an array of the size needed to exactly hold
  the output and copies the entire byte array to it.
  <p>
  This makes an unchecked assumption that {{@link #serialize(IonDatagram)}
  is already called.
  
  @return the newly allocated byte array