code: public void write(int b) throws IOException {
          cache[cachePosition] = (byte) b;
          cachePosition++;
          if (cachePosition == cache.length) flushCache();
      }
docs: Write the specified byte to our output stream.
  
  Note: Avoid this method as it will cause an inefficient single byte chunk.
  Use write (byte[], int, int) instead.
  
  @param b The byte to be written
  @throws IOException if an input/output error occurs