code: @Override
      public void close()
              throws IOException
      {
          if (closed) {
              return;
          }
          try {
              flush();
              out.close();
          }
          finally {
              closed = true;
              inputBufferAllocator.release(inputBuffer);
              outputBufferAllocator.release(outputBuffer);
              inputBuffer = null;
              outputBuffer = null;
          }
      }
docs: /* (non-Javadoc)
  @see java.io.OutputStream#close()