class S3TransportBuffer implements TransportBuffer {

  @Override
  public boolean add(InternalEvent ievent) throws IllegalStateException, IOException {
    byte[] payload = serializer.serialize(ievent);
    if (cos.getByteCount() + payload.length > this.maxBytes) {
      throw new IllegalStateException("buffer is full");
    }

    os.write(payload);
    return true;
  }

  public  S3TransportBuffer(long maxBytes, boolean useCompression, S3TransportSerializer serializer);

}