public void readIntest(InputStream in) {
    try {
      intest = new byte[54];
      in.read(intest, 0, 54);
      for (int i = 0; i < 2; i++) {bfType = bfType * 256 + intest[i];}
      sbfType = (char)intest[0] + "" + (char)intest[1];
      if (! sbfType.equals("BM")) { throw new RuntimeException("Input file is not a valid bitmap file !"); }
      bfSize = readDWord(intest,2);
      bfOffset = readDWord(intest,10);
      biSize = readDWord(intest,14);
      biWidth = readLong(intest,18);
      biHeight = readLong(intest,22);
      biPlanes = readWord(intest,26) >> 8;
      biBitCount = readWord(intest,28) >> 8;
      biCompression = readDWord(intest,30);
      if (biCompression > 0) { throw new RuntimeException("Source image must be uncompressed !"); }
      biSizeImage = readDWord(intest, 34);
      biXPelsPerMeter = readLong(intest,38);
      biYPelsPerMeter = readLong(intest,42);
      biClrUsed = readWord(intest,44);
      biClrImportant = readWord(intest,46);
      rgbBlue = intest[50] >= 0 ? intest[50] : 256 + intest[50];
      rgbGreen = intest[51] >= 0 ? intest[51] : 256 + intest[51];
      rgbRed = intest[52] >= 0 ? intest[52] : 256 + intest[52];
    } catch (RuntimeException e) {
      throw e;
    } catch (IOException e) {
      throw new RuntimeException(e.getMessage());
    }
  }