code: public static void append(ByteBuffer to, byte b) {
          int pos = flipToFill(to);
          try {
              to.put(b);
          } finally {
              flipToFlush(to, pos);
          }
      }
docs: Appends a byte to a buffer
  
  @param to Buffer is flush mode
  @param b  byte to append