0

How to check whether a byte array is a corrupted FastInfoSet Document or just binary garbage?

I mean maybe exists some binary "header" that we can check this.

CAMOBAP
  • 5,523
  • 8
  • 58
  • 93

1 Answers1

0

There is exists static method isFastInfosetDocument in com.sun.xml.internal.fastinfoset.Decoder class that check the first 4 bytes in java.io.InputStream.

Of course it will work only if not corrupted the first 4 bytes.

CAMOBAP
  • 5,523
  • 8
  • 58
  • 93