byte[] contents = org.eclipse.jdt.internal.compiler.util.Util.getInputStreamAsByteArray(stream, connection.getContentLength()); if (encoding == null) { int index = getIndexOf(contents, CONTENT_TYPE, 0); if (index != -1) { index = getIndexOf(contents, CONTENT, index); if (index != -1) { int offset = index + CONTENT.length; int index2 = getIndexOf(contents, CLOSING_DOUBLE_QUOTE, offset); if (index2 != -1) { final int charsetIndex = getIndexOf(contents, CHARSET, offset); if (charsetIndex != -1) { int start = charsetIndex + CHARSET.length;
byte[] contents = org.eclipse.jdt.internal.compiler.util.Util.getInputStreamAsByteArray(stream, connection.getContentLength()); if (encoding == null) { int index = getIndexOf(contents, META_START, 0, -1); if (index != -1) { int end = getIndexOf(contents, META_END, index, -1); if (end != -1) { if ((end + 1) <= contents.length) end++; int charsetIndex = getIndexOf(contents, CHARSET_HTML5, index, end); if (charsetIndex == -1) { charsetIndex = getIndexOf(contents, CHARSET, index, end); if (charsetIndex != -1) charsetIndex = charsetIndex + CHARSET.length; end = getIndexOf(contents, CLOSING_DOUBLE_QUOTE, charsetIndex, end); encoding = new String(contents, charsetIndex, end - charsetIndex, org.eclipse.jdt.internal.compiler.util.Util.UTF_8);
byte[] contents = org.eclipse.jdt.internal.compiler.util.Util.getInputStreamAsByteArray(stream, connection.getContentLength()); if (encoding == null) { int index = getIndexOf(contents, META_START, 0, -1); if (index != -1) { int end = getIndexOf(contents, META_END, index, -1); if (end != -1) { if ((end + 1) <= contents.length) end++; int charsetIndex = getIndexOf(contents, CHARSET_HTML5, index, end); if (charsetIndex == -1) { charsetIndex = getIndexOf(contents, CHARSET, index, end); if (charsetIndex != -1) charsetIndex = charsetIndex + CHARSET.length; end = getIndexOf(contents, CLOSING_DOUBLE_QUOTE, charsetIndex, end); encoding = new String(contents, charsetIndex, end - charsetIndex, org.eclipse.jdt.internal.compiler.util.Util.UTF_8);
byte[] contents = org.eclipse.jdt.internal.compiler.util.Util.getInputStreamAsByteArray(stream, connection.getContentLength()); if (encoding == null) { int index = getIndexOf(contents, META_START, 0, -1); if (index != -1) { int end = getIndexOf(contents, META_END, index, -1); if (end != -1) { if ((end + 1) <= contents.length) end++; int charsetIndex = getIndexOf(contents, CHARSET_HTML5, index, end); if (charsetIndex == -1) { charsetIndex = getIndexOf(contents, CHARSET, index, end); if (charsetIndex != -1) charsetIndex = charsetIndex + CHARSET.length; end = getIndexOf(contents, CLOSING_DOUBLE_QUOTE, charsetIndex, end); encoding = new String(contents, charsetIndex, end - charsetIndex, org.eclipse.jdt.internal.compiler.util.Util.UTF_8);
byte[] contents = org.eclipse.jdt.internal.compiler.util.Util.getInputStreamAsByteArray(stream, connection.getContentLength()); if (encoding == null) { int index = getIndexOf(contents, META_START, 0, -1); if (index != -1) { int end = getIndexOf(contents, META_END, index, -1); if (end != -1) { if ((end + 1) <= contents.length) end++; int charsetIndex = getIndexOf(contents, CHARSET_HTML5, index, end); if (charsetIndex == -1) { charsetIndex = getIndexOf(contents, CHARSET, index, end); if (charsetIndex != -1) charsetIndex = charsetIndex + CHARSET.length; end = getIndexOf(contents, CLOSING_DOUBLE_QUOTE, charsetIndex, end); encoding = new String(contents, charsetIndex, end - charsetIndex, org.eclipse.jdt.internal.compiler.util.Util.UTF_8);
byte[] contents = org.eclipse.jdt.internal.compiler.util.Util.getInputStreamAsByteArray(stream, connection.getContentLength()); if (encoding == null) { int index = getIndexOf(contents, META_START, 0, -1); if (index != -1) { int end = getIndexOf(contents, META_END, index, -1); if (end != -1) { if ((end + 1) <= contents.length) end++; int charsetIndex = getIndexOf(contents, CHARSET_HTML5, index, end); if (charsetIndex == -1) { charsetIndex = getIndexOf(contents, CHARSET, index, end); if (charsetIndex != -1) charsetIndex = charsetIndex + CHARSET.length; end = getIndexOf(contents, CLOSING_DOUBLE_QUOTE, charsetIndex, end); encoding = new String(contents, charsetIndex, end - charsetIndex, org.eclipse.jdt.internal.compiler.util.Util.UTF_8);