code: public void writeWindowFrame(int windowSize) throws IOException {
          ByteArrayOutputStream output = new ByteArrayOutputStream();
  
          output.write(PROTOCOL_VERSION.getBytes(UTF_8));//Protocol version
          output.write(WINDOW_SIZE_FRAME_TYPE.getBytes(UTF_8)); //Frame type 'W'
          output.write(ByteBuffer.allocate(4).putInt(windowSize).array());//32-bit window size
  
          lastUsedTime = System.currentTimeMillis();
          out.write(output.toByteArray());
          out.flush();
      }
docs: Write a window frame to the wire.
  
  @param windowSize
  @throws IOException