class S3TransportBuffer implements TransportBuffer {

  @Override
  public void close() {
    if (this.os != this.cos) {
      try {
        this.os.flush();
      } catch (IOException e) {
        logger.warn("unable to flush os");
      }
      try {
        this.os.close();
      } catch (IOException e) {
        logger.warn("unable to close os");
      }
    }

    try {
      this.cos.flush();
    } catch (IOException e) {
      logger.warn("unable to flush cos");
    }

    try {
      this.cos.close();
    } catch (IOException e) {
      logger.warn("unable to close cos");
    }
  }

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

}