code: @Override
      public ImageHeader readHeader(InputStream input) throws IOException
      {
          checkSkippedError(input.skip(2), 2);
          int current = input.read();
          while (255 == current)
          {
              final int marker = input.read();
              final int len = readInt(input, 2, true);
              if (MARKER_1 == marker || MARKER_2 == marker || MARKER_3 == marker)
              {
                  final long skipped = input.skip(1);
                  checkSkippedError(skipped, 1);
                  final int height = readInt(input, 2, true);
                  final int width = readInt(input, 2, true);
                  final ImageFormat format = ImageFormat.JPG;
  
                  return new ImageHeaderModel(width, height, format);
              }
              final long skipped = input.skip(len - 2L);
              checkSkippedError(skipped, len - 2);
              current = input.read();
          }
          throw new IOException(ERROR_JPG);
      }
docs: /*
  ImageHeaderReader