test_class.declarator: XML5 = "xml-prolog-encoding-spaced-single-quotes"
test_class.modifier: private static final
test_class.original_string: private static final String XML5 = "xml-prolog-encoding-spaced-single-quotes";
test_class.type: String
test_class.var_name: XML5
test_class.declarator: XML4 = "xml-prolog-encoding-single-quotes"
test_class.modifier: private static final
test_class.original_string: private static final String XML4 = "xml-prolog-encoding-single-quotes";
test_class.type: String
test_class.var_name: XML4
test_class.declarator: XML3 = "xml-prolog-encoding-double-quotes"
test_class.modifier: private static final
test_class.original_string: private static final String XML3 = "xml-prolog-encoding-double-quotes";
test_class.type: String
test_class.var_name: XML3
test_class.declarator: XML2 = "xml-prolog"
test_class.modifier: private static final
test_class.original_string: private static final String XML2 = "xml-prolog";
test_class.type: String
test_class.var_name: XML2
test_class.declarator: XML1 = "xml"
test_class.modifier: private static final
test_class.original_string: private static final String XML1 = "xml";
test_class.type: String
test_class.var_name: XML1
test_class.declarator: expectedException = ExpectedException.none()
test_class.modifier: @Rule
      public
test_class.original_string: @Rule
      public ExpectedException expectedException = ExpectedException.none();
test_class.type: ExpectedException
test_class.var_name: expectedException
test_class.declarator: ENCODING_ATTRIBUTE_XML = "<?xml version=\"1.0\" ?> \n" + "<atom:feed xmlns:atom=\"http://www.w3.org/2005/Atom\">\n" + "\n"
              + "  <atom:entry>\n" + "    <atom:title encoding=\"base64\"><![CDATA\n" + "aW5nTGluZSIgLz4"
test_class.modifier: private static final
test_class.original_string: private static final String ENCODING_ATTRIBUTE_XML = "<?xml version=\"1.0\" ?> \n" + "<atom:feed xmlns:atom=\"http://www.w3.org/2005/Atom\">\n" + "\n"
              + "  <atom:entry>\n" + "    <atom:title encoding=\"base64\"><![CDATA\n" + "aW5nTGluZSIgLz4";
test_class.type: String
test_class.var_name: ENCODING_ATTRIBUTE_XML
test_class.declarator: NO_BOM_BYTES = {}
test_class.modifier: private static final
test_class.original_string: private static final int[] NO_BOM_BYTES = {};
test_class.type: int[]
test_class.var_name: NO_BOM_BYTES
test_class.declarator: UTF_16BE_BOM_BYTES = { 0xFE, 0xFF }
test_class.modifier: private static final
test_class.original_string: private static final int[] UTF_16BE_BOM_BYTES = { 0xFE, 0xFF };
test_class.type: int[]
test_class.var_name: UTF_16BE_BOM_BYTES
test_class.declarator: UTF_16LE_BOM_BYTES = { 0xFF, 0XFE }
test_class.modifier: private static final
test_class.original_string: private static final int[] UTF_16LE_BOM_BYTES = { 0xFF, 0XFE };
test_class.type: int[]
test_class.var_name: UTF_16LE_BOM_BYTES
test_class.declarator: UTF_8_BOM_BYTES = { 0xEF, 0xBB, 0xBF }
test_class.modifier: private static final
test_class.original_string: private static final int[] UTF_8_BOM_BYTES = { 0xEF, 0xBB, 0xBF };
test_class.type: int[]
test_class.var_name: UTF_8_BOM_BYTES
test_class.declarator: BOMs = new HashMap<String, int[]>()
test_class.modifier: private static final
test_class.original_string: private static final Map<String, int[]> BOMs = new HashMap<String, int[]>();
test_class.type: Map<String, int[]>
test_class.var_name: BOMs
test_class.declarator: XML = new MessageFormat("<root>{2}</root>")
test_class.modifier: private static final
test_class.original_string: private static final MessageFormat XML = new MessageFormat("<root>{2}</root>");
test_class.type: MessageFormat
test_class.var_name: XML
test_class.declarator: XML_WITH_PROLOG = new MessageFormat("<?xml version=\"1.0\"?>\n<root>{2}</root>")
test_class.modifier: private static final
test_class.original_string: private static final MessageFormat XML_WITH_PROLOG = new MessageFormat("<?xml version=\"1.0\"?>\n<root>{2}</root>");
test_class.type: MessageFormat
test_class.var_name: XML_WITH_PROLOG
test_class.declarator: XML_WITH_PROLOG_AND_ENCODING_DOUBLE_QUOTES = new MessageFormat(
              "<?xml version=\"1.0\" encoding=\"{1}\"?>\n<root>{2}</root>")
test_class.modifier: private static final
test_class.original_string: private static final MessageFormat XML_WITH_PROLOG_AND_ENCODING_DOUBLE_QUOTES = new MessageFormat(
              "<?xml version=\"1.0\" encoding=\"{1}\"?>\n<root>{2}</root>");
test_class.type: MessageFormat
test_class.var_name: XML_WITH_PROLOG_AND_ENCODING_DOUBLE_QUOTES
test_class.declarator: XML_WITH_PROLOG_AND_ENCODING_SINGLE_QUOTES = new MessageFormat(
              "<?xml version=\"1.0\" encoding=''{1}''?>\n<root>{2}</root>")
test_class.modifier: private static final
test_class.original_string: private static final MessageFormat XML_WITH_PROLOG_AND_ENCODING_SINGLE_QUOTES = new MessageFormat(
              "<?xml version=\"1.0\" encoding=''{1}''?>\n<root>{2}</root>");
test_class.type: MessageFormat
test_class.var_name: XML_WITH_PROLOG_AND_ENCODING_SINGLE_QUOTES
test_class.declarator: XML_WITH_PROLOG_AND_ENCODING_SPACED_SINGLE_QUOTES = new MessageFormat(
              "<?xml version=\"1.0\" encoding =  \t \n \r''{1}''?>\n<root>{2}</root>")
test_class.modifier: private static final
test_class.original_string: private static final MessageFormat XML_WITH_PROLOG_AND_ENCODING_SPACED_SINGLE_QUOTES = new MessageFormat(
              "<?xml version=\"1.0\" encoding =  \t \n \r''{1}''?>\n<root>{2}</root>");
test_class.type: MessageFormat
test_class.var_name: XML_WITH_PROLOG_AND_ENCODING_SPACED_SINGLE_QUOTES
test_class.declarator: INFO = new MessageFormat("\nBOM : {0}\nDoc : {1}\nStream Enc : {2}\nProlog Enc : {3}\n")
test_class.modifier: private static final
test_class.original_string: private static final MessageFormat INFO = new MessageFormat("\nBOM : {0}\nDoc : {1}\nStream Enc : {2}\nProlog Enc : {3}\n");
test_class.type: MessageFormat
test_class.var_name: INFO
test_class.declarator: XMLs = new HashMap<String, MessageFormat>()
test_class.modifier: private static final
test_class.original_string: private static final Map<String, MessageFormat> XMLs = new HashMap<String, MessageFormat>();
test_class.type: Map<String, MessageFormat>
test_class.var_name: XMLs
test_class.file: rome/src/test/java/com/rometools/rome/io/XmlReaderTest.java
test_class.identifier: XmlReaderTest
test_case.body: @Test
      public void testGetXmlProlog_DifferentAsciiCompatible() throws IOException {
          final InputStream input = stringToStream("<?xml encoding=\"TEST\"?>", "ISO-8859-1");
          final String guessedEncoding = "UTF-8";
  
          assertEquals("TEST", XmlReader.getXmlProlog(input, guessedEncoding));
      }
test_case.class_method_signature: XmlReaderTest.testGetXmlProlog_DifferentAsciiCompatible()
test_case.full_signature: @Test public void testGetXmlProlog_DifferentAsciiCompatible()
test_case.identifier: testGetXmlProlog_DifferentAsciiCompatible
test_case.invocations: stringToStream assertEquals getXmlProlog
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetXmlProlog_DifferentAsciiCompatible()
focal_class.declarator: BUFFER_SIZE = 4096
focal_class.modifier: private static final
focal_class.original_string: private static final int BUFFER_SIZE = 4096;
focal_class.type: int
focal_class.var_name: BUFFER_SIZE
focal_class.declarator: US_ASCII = "US-ASCII"
focal_class.modifier: private static final
focal_class.original_string: private static final String US_ASCII = "US-ASCII";
focal_class.type: String
focal_class.var_name: US_ASCII
focal_class.declarator: UTF_8 = "UTF-8"
focal_class.modifier: private static final
focal_class.original_string: private static final String UTF_8 = "UTF-8";
focal_class.type: String
focal_class.var_name: UTF_8
focal_class.declarator: UTF_16BE = "UTF-16BE"
focal_class.modifier: private static final
focal_class.original_string: private static final String UTF_16BE = "UTF-16BE";
focal_class.type: String
focal_class.var_name: UTF_16BE
focal_class.declarator: UTF_16LE = "UTF-16LE"
focal_class.modifier: private static final
focal_class.original_string: private static final String UTF_16LE = "UTF-16LE";
focal_class.type: String
focal_class.var_name: UTF_16LE
focal_class.declarator: UTF_16 = "UTF-16"
focal_class.modifier: private static final
focal_class.original_string: private static final String UTF_16 = "UTF-16";
focal_class.type: String
focal_class.var_name: UTF_16
focal_class.declarator: CP1047 = "CP1047"
focal_class.modifier: private static final
focal_class.original_string: private static final String CP1047 = "CP1047";
focal_class.type: String
focal_class.var_name: CP1047
focal_class.declarator: CHARSET_PATTERN = Pattern.compile("charset=([.[^; ]]*)")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern CHARSET_PATTERN = Pattern.compile("charset=([.[^; ]]*)");
focal_class.type: Pattern
focal_class.var_name: CHARSET_PATTERN
focal_class.declarator: ENCODING_PATTERN = Pattern.compile("<\\?xml.*encoding[\\s]*=[\\s]*((?:\".[^\"]*\")|(?:'.[^']*'))", Pattern.MULTILINE)
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern ENCODING_PATTERN = Pattern.compile("<\\?xml.*encoding[\\s]*=[\\s]*((?:\".[^\"]*\")|(?:'.[^']*'))", Pattern.MULTILINE);
focal_class.type: Pattern
focal_class.var_name: ENCODING_PATTERN
focal_class.declarator: RAW_EX_1 = new MessageFormat("Invalid encoding, BOM [{0}] XML guess [{1}] XML prolog [{2}] encoding mismatch")
focal_class.modifier: private static final
focal_class.original_string: private static final MessageFormat RAW_EX_1 = new MessageFormat("Invalid encoding, BOM [{0}] XML guess [{1}] XML prolog [{2}] encoding mismatch");
focal_class.type: MessageFormat
focal_class.var_name: RAW_EX_1
focal_class.declarator: RAW_EX_2 = new MessageFormat("Invalid encoding, BOM [{0}] XML guess [{1}] XML prolog [{2}] unknown BOM")
focal_class.modifier: private static final
focal_class.original_string: private static final MessageFormat RAW_EX_2 = new MessageFormat("Invalid encoding, BOM [{0}] XML guess [{1}] XML prolog [{2}] unknown BOM");
focal_class.type: MessageFormat
focal_class.var_name: RAW_EX_2
focal_class.declarator: HTTP_EX_1 = new MessageFormat(
              "Invalid encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], BOM must be NULL")
focal_class.modifier: private static final
focal_class.original_string: private static final MessageFormat HTTP_EX_1 = new MessageFormat(
              "Invalid encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], BOM must be NULL");
focal_class.type: MessageFormat
focal_class.var_name: HTTP_EX_1
focal_class.declarator: HTTP_EX_2 = new MessageFormat(
              "Invalid encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], encoding mismatch")
focal_class.modifier: private static final
focal_class.original_string: private static final MessageFormat HTTP_EX_2 = new MessageFormat(
              "Invalid encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], encoding mismatch");
focal_class.type: MessageFormat
focal_class.var_name: HTTP_EX_2
focal_class.declarator: HTTP_EX_3 = new MessageFormat(
              "Invalid encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], Invalid MIME")
focal_class.modifier: private static final
focal_class.original_string: private static final MessageFormat HTTP_EX_3 = new MessageFormat(
              "Invalid encoding, CT-MIME [{0}] CT-Enc [{1}] BOM [{2}] XML guess [{3}] XML prolog [{4}], Invalid MIME");
focal_class.type: MessageFormat
focal_class.var_name: HTTP_EX_3
focal_class.declarator: staticDefaultEncoding = null
focal_class.modifier: private static
focal_class.original_string: private static String staticDefaultEncoding = null;
focal_class.type: String
focal_class.var_name: staticDefaultEncoding
focal_class.declarator: defaultEncoding
focal_class.modifier: private final
focal_class.original_string: private final String defaultEncoding;
focal_class.type: String
focal_class.var_name: defaultEncoding
focal_class.declarator: reader
focal_class.modifier: private
focal_class.original_string: private Reader reader;
focal_class.type: Reader
focal_class.var_name: reader
focal_class.declarator: encoding
focal_class.modifier: private
focal_class.original_string: private String encoding;
focal_class.type: String
focal_class.var_name: encoding
focal_class.file: rome/src/main/java/com/rometools/rome/io/XmlReader.java
focal_class.identifier: XmlReader
focal_class.class_method_signature: XmlReader.XmlReader(final File file)
focal_class.full_signature: public  XmlReader(final File file)
focal_class.identifier: XmlReader
focal_class.modifiers: public
focal_class.parameters: (final File file)
focal_class.signature:  XmlReader(final File file)
focal_class.class_method_signature: XmlReader.XmlReader(final InputStream is)
focal_class.full_signature: public  XmlReader(final InputStream is)
focal_class.identifier: XmlReader
focal_class.modifiers: public
focal_class.parameters: (final InputStream is)
focal_class.signature:  XmlReader(final InputStream is)
focal_class.class_method_signature: XmlReader.XmlReader(final InputStream is, final boolean lenient, final String defaultEncoding)
focal_class.full_signature: public  XmlReader(final InputStream is, final boolean lenient, final String defaultEncoding)
focal_class.identifier: XmlReader
focal_class.modifiers: public
focal_class.parameters: (final InputStream is, final boolean lenient, final String defaultEncoding)
focal_class.signature:  XmlReader(final InputStream is, final boolean lenient, final String defaultEncoding)
focal_class.class_method_signature: XmlReader.XmlReader(final InputStream is, final boolean lenient)
focal_class.full_signature: public  XmlReader(final InputStream is, final boolean lenient)
focal_class.identifier: XmlReader
focal_class.modifiers: public
focal_class.parameters: (final InputStream is, final boolean lenient)
focal_class.signature:  XmlReader(final InputStream is, final boolean lenient)
focal_class.class_method_signature: XmlReader.XmlReader(final URL url)
focal_class.full_signature: public  XmlReader(final URL url)
focal_class.identifier: XmlReader
focal_class.modifiers: public
focal_class.parameters: (final URL url)
focal_class.signature:  XmlReader(final URL url)
focal_class.class_method_signature: XmlReader.XmlReader(final URL url, final Map<String, String> requestHeaders)
focal_class.full_signature: public  XmlReader(final URL url, final Map<String, String> requestHeaders)
focal_class.identifier: XmlReader
focal_class.modifiers: public
focal_class.parameters: (final URL url, final Map<String, String> requestHeaders)
focal_class.signature:  XmlReader(final URL url, final Map<String, String> requestHeaders)
focal_class.class_method_signature: XmlReader.XmlReader(final URLConnection conn)
focal_class.full_signature: public  XmlReader(final URLConnection conn)
focal_class.identifier: XmlReader
focal_class.modifiers: public
focal_class.parameters: (final URLConnection conn)
focal_class.signature:  XmlReader(final URLConnection conn)
focal_class.class_method_signature: XmlReader.XmlReader(final URLConnection conn, final Map<String, String> requestHeaders)
focal_class.full_signature: public  XmlReader(final URLConnection conn, final Map<String, String> requestHeaders)
focal_class.identifier: XmlReader
focal_class.modifiers: public
focal_class.parameters: (final URLConnection conn, final Map<String, String> requestHeaders)
focal_class.signature:  XmlReader(final URLConnection conn, final Map<String, String> requestHeaders)
focal_class.class_method_signature: XmlReader.XmlReader(final InputStream is, final String httpContentType)
focal_class.full_signature: public  XmlReader(final InputStream is, final String httpContentType)
focal_class.identifier: XmlReader
focal_class.modifiers: public
focal_class.parameters: (final InputStream is, final String httpContentType)
focal_class.signature:  XmlReader(final InputStream is, final String httpContentType)
focal_class.class_method_signature: XmlReader.XmlReader(final InputStream is, final String httpContentType, final boolean lenient, final String defaultEncoding)
focal_class.full_signature: public  XmlReader(final InputStream is, final String httpContentType, final boolean lenient, final String defaultEncoding)
focal_class.identifier: XmlReader
focal_class.modifiers: public
focal_class.parameters: (final InputStream is, final String httpContentType, final boolean lenient, final String defaultEncoding)
focal_class.signature:  XmlReader(final InputStream is, final String httpContentType, final boolean lenient, final String defaultEncoding)
focal_class.class_method_signature: XmlReader.XmlReader(final InputStream is, final String httpContentType, final boolean lenient)
focal_class.full_signature: public  XmlReader(final InputStream is, final String httpContentType, final boolean lenient)
focal_class.identifier: XmlReader
focal_class.modifiers: public
focal_class.parameters: (final InputStream is, final String httpContentType, final boolean lenient)
focal_class.signature:  XmlReader(final InputStream is, final String httpContentType, final boolean lenient)
focal_class.class_method_signature: XmlReader.getDefaultEncoding()
focal_class.full_signature: public static String getDefaultEncoding()
focal_class.identifier: getDefaultEncoding
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getDefaultEncoding()
focal_class.class_method_signature: XmlReader.setDefaultEncoding(final String encoding)
focal_class.full_signature: public static void setDefaultEncoding(final String encoding)
focal_class.identifier: setDefaultEncoding
focal_class.modifiers: public static
focal_class.parameters: (final String encoding)
focal_class.return: void
focal_class.signature: void setDefaultEncoding(final String encoding)
focal_class.class_method_signature: XmlReader.getEncoding()
focal_class.full_signature: public String getEncoding()
focal_class.identifier: getEncoding
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getEncoding()
focal_class.class_method_signature: XmlReader.doLenientDetection(String httpContentType, XmlReaderException ex)
focal_class.full_signature: private void doLenientDetection(String httpContentType, XmlReaderException ex)
focal_class.identifier: doLenientDetection
focal_class.modifiers: private
focal_class.parameters: (String httpContentType, XmlReaderException ex)
focal_class.return: void
focal_class.signature: void doLenientDetection(String httpContentType, XmlReaderException ex)
focal_class.class_method_signature: XmlReader.read(final char[] buf, final int offset, final int len)
focal_class.full_signature: @Override public int read(final char[] buf, final int offset, final int len)
focal_class.identifier: read
focal_class.modifiers: @Override public
focal_class.parameters: (final char[] buf, final int offset, final int len)
focal_class.return: int
focal_class.signature: int read(final char[] buf, final int offset, final int len)
focal_class.class_method_signature: XmlReader.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: XmlReader.doRawStream(final InputStream is, final boolean lenient)
focal_class.full_signature: private void doRawStream(final InputStream is, final boolean lenient)
focal_class.identifier: doRawStream
focal_class.modifiers: private
focal_class.parameters: (final InputStream is, final boolean lenient)
focal_class.return: void
focal_class.signature: void doRawStream(final InputStream is, final boolean lenient)
focal_class.class_method_signature: XmlReader.doHttpStream(final InputStream is, final String httpContentType, final boolean lenient)
focal_class.full_signature: private void doHttpStream(final InputStream is, final String httpContentType, final boolean lenient)
focal_class.identifier: doHttpStream
focal_class.modifiers: private
focal_class.parameters: (final InputStream is, final String httpContentType, final boolean lenient)
focal_class.return: void
focal_class.signature: void doHttpStream(final InputStream is, final String httpContentType, final boolean lenient)
focal_class.class_method_signature: XmlReader.prepareReader(final InputStream is, final String encoding)
focal_class.full_signature: private void prepareReader(final InputStream is, final String encoding)
focal_class.identifier: prepareReader
focal_class.modifiers: private
focal_class.parameters: (final InputStream is, final String encoding)
focal_class.return: void
focal_class.signature: void prepareReader(final InputStream is, final String encoding)
focal_class.class_method_signature: XmlReader.calculateRawEncoding(final String bomEnc, final String xmlGuessEnc, final String xmlEnc, final InputStream is)
focal_class.full_signature: private String calculateRawEncoding(final String bomEnc, final String xmlGuessEnc, final String xmlEnc, final InputStream is)
focal_class.identifier: calculateRawEncoding
focal_class.modifiers: private
focal_class.parameters: (final String bomEnc, final String xmlGuessEnc, final String xmlEnc, final InputStream is)
focal_class.return: String
focal_class.signature: String calculateRawEncoding(final String bomEnc, final String xmlGuessEnc, final String xmlEnc, final InputStream is)
focal_class.class_method_signature: XmlReader.setRequestHeader(final URLConnection conn, final Map<String, String> requestHeaders)
focal_class.full_signature: private void setRequestHeader(final URLConnection conn, final Map<String, String> requestHeaders)
focal_class.identifier: setRequestHeader
focal_class.modifiers: private
focal_class.parameters: (final URLConnection conn, final Map<String, String> requestHeaders)
focal_class.return: void
focal_class.signature: void setRequestHeader(final URLConnection conn, final Map<String, String> requestHeaders)
focal_class.class_method_signature: XmlReader.calculateHttpEncoding(final String cTMime, final String cTEnc, final String bomEnc, final String xmlGuessEnc, final String xmlEnc,
              final InputStream is, final boolean lenient)
focal_class.full_signature: private String calculateHttpEncoding(final String cTMime, final String cTEnc, final String bomEnc, final String xmlGuessEnc, final String xmlEnc,
              final InputStream is, final boolean lenient)
focal_class.identifier: calculateHttpEncoding
focal_class.modifiers: private
focal_class.parameters: (final String cTMime, final String cTEnc, final String bomEnc, final String xmlGuessEnc, final String xmlEnc,
              final InputStream is, final boolean lenient)
focal_class.return: String
focal_class.signature: String calculateHttpEncoding(final String cTMime, final String cTEnc, final String bomEnc, final String xmlGuessEnc, final String xmlEnc,
              final InputStream is, final boolean lenient)
focal_class.class_method_signature: XmlReader.getContentTypeMime(final String httpContentType)
focal_class.full_signature: private static String getContentTypeMime(final String httpContentType)
focal_class.identifier: getContentTypeMime
focal_class.modifiers: private static
focal_class.parameters: (final String httpContentType)
focal_class.return: String
focal_class.signature: String getContentTypeMime(final String httpContentType)
focal_class.class_method_signature: XmlReader.getContentTypeEncoding(final String httpContentType)
focal_class.full_signature: private static String getContentTypeEncoding(final String httpContentType)
focal_class.identifier: getContentTypeEncoding
focal_class.modifiers: private static
focal_class.parameters: (final String httpContentType)
focal_class.return: String
focal_class.signature: String getContentTypeEncoding(final String httpContentType)
focal_class.class_method_signature: XmlReader.getBOMEncoding(final BufferedInputStream is)
focal_class.full_signature: private static String getBOMEncoding(final BufferedInputStream is)
focal_class.identifier: getBOMEncoding
focal_class.modifiers: private static
focal_class.parameters: (final BufferedInputStream is)
focal_class.return: String
focal_class.signature: String getBOMEncoding(final BufferedInputStream is)
focal_class.class_method_signature: XmlReader.getXMLGuessEncoding(final BufferedInputStream is)
focal_class.full_signature: private static String getXMLGuessEncoding(final BufferedInputStream is)
focal_class.identifier: getXMLGuessEncoding
focal_class.modifiers: private static
focal_class.parameters: (final BufferedInputStream is)
focal_class.return: String
focal_class.signature: String getXMLGuessEncoding(final BufferedInputStream is)
focal_class.class_method_signature: XmlReader.getXmlProlog(final InputStream is, final String guessedEnc)
focal_class.full_signature: static String getXmlProlog(final InputStream is, final String guessedEnc)
focal_class.identifier: getXmlProlog
focal_class.modifiers: static
focal_class.parameters: (final InputStream is, final String guessedEnc)
focal_class.return: String
focal_class.signature: String getXmlProlog(final InputStream is, final String guessedEnc)
focal_class.class_method_signature: XmlReader.isAppXml(final String mime)
focal_class.full_signature: private static boolean isAppXml(final String mime)
focal_class.identifier: isAppXml
focal_class.modifiers: private static
focal_class.parameters: (final String mime)
focal_class.return: boolean
focal_class.signature: boolean isAppXml(final String mime)
focal_class.class_method_signature: XmlReader.isTextXml(final String mime)
focal_class.full_signature: private static boolean isTextXml(final String mime)
focal_class.identifier: isTextXml
focal_class.modifiers: private static
focal_class.parameters: (final String mime)
focal_class.return: boolean
focal_class.signature: boolean isTextXml(final String mime)
focal_class.superclass: extends Reader
focal_method.body: static String getXmlProlog(final InputStream is, final String guessedEnc) throws IOException {
          String encoding = null;
          if (guessedEnc != null) {
              final byte[] bytes = new byte[BUFFER_SIZE];
              is.mark(BUFFER_SIZE);
              int offset = 0;
              int max = BUFFER_SIZE;
              int c = is.read(bytes, offset, max);
              int firstGT = -1;
              while (c != -1 && firstGT == -1 && offset < BUFFER_SIZE) {
                  offset += c;
                  max -= c;
                  c = is.read(bytes, offset, max);
                  firstGT = new String(bytes, 0, offset, guessedEnc).indexOf(">");
              }
              if (firstGT == -1) {
                  if (c == -1) {
                      throw new IOException("Unexpected end of XML stream");
                  } else {
                      throw new IOException("XML prolog or ROOT element not found on first " + offset + " bytes");
                  }
              }
              final int bytesRead = offset;
              if (bytesRead > 0) {
                  is.reset();
                  String prolog = new String(bytes, guessedEnc).substring(0, firstGT);
                  final Matcher m = ENCODING_PATTERN.matcher(prolog);
                  if (m.find()) {
                      encoding = m.group(1).toUpperCase(Locale.ENGLISH);
                      encoding = encoding.substring(1, encoding.length() - 1);
                  }
              }
          }
          return encoding;
      }
focal_method.class_method_signature: XmlReader.getXmlProlog(final InputStream is, final String guessedEnc)
focal_method.full_signature: static String getXmlProlog(final InputStream is, final String guessedEnc)
focal_method.identifier: getXmlProlog
focal_method.invocations: mark read read indexOf reset substring matcher find toUpperCase group substring length
focal_method.modifiers: static
focal_method.parameters: (final InputStream is, final String guessedEnc)
focal_method.return: String
focal_method.signature: String getXmlProlog(final InputStream is, final String guessedEnc)