code: private void writeInts(int[] bytes, OutputStream outStream) throws IOException
     {
        for (int i = 0; i < bytes.length; i++)
        {
           byte curByte = (byte)bytes[i];
           outStream.write(curByte);
        }
     }
docs: Writes int array into stream.
  
  @param bytes int array
  @param outStream stream
  @throws IOException {@link IOException}