I have an xml with utf8 encoding.
And this file contains BOM a beginning of the file.
So during parsing I am facing with org.xml.sax.SAXParseException: Content is not allowed in prolog.
I can not remove those 3 bytes from the files.
I can not load file into memory and remove them here (files are big).
So for performance reasons I'm using SAX parser and want just to skip those 3 bytes if they are present before "" tag.
Should I inherit InputStreamReader for this?
I'm new in java - show me the right way please.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…