code: @Override
      public void write(int idx) throws IOException {
          try {
              beforeWrite(1);
              out.write(idx);
              afterWrite(1);
          } catch (IOException e) {
              handleIOException(e);
          }
      }
docs: Invokes the delegate's <code>write(int)</code> method.
  
  @param idx the byte to write
  @throws java.io.IOException if an I/O error occurs