< prev index next >
src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/XMLDeclarationParser.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 74,87 ****
public void parse() throws TransformerException, IOException
{
int c = 0;
int index = 0;
! char[] aChar = new char[65535];
! StringBuffer xmlDeclStr = new StringBuffer();
while ((c = m_pushbackReader.read()) != -1) {
- aChar[index] = (char)c;
xmlDeclStr.append((char)c);
index++;
if (c == '>') {
break;
}
--- 74,85 ----
public void parse() throws TransformerException, IOException
{
int c = 0;
int index = 0;
! StringBuilder xmlDeclStr = new StringBuilder();
while ((c = m_pushbackReader.read()) != -1) {
xmlDeclStr.append((char)c);
index++;
if (c == '>') {
break;
}
*** 102,112 ****
}
}
// no XML decl
if (!utf16 && !utf8) {
! m_pushbackReader.unread(aChar, 0, len);
return;
}
m_hasHeader = true;
if (utf16) {
--- 100,110 ----
}
}
// no XML decl
if (!utf16 && !utf8) {
! m_pushbackReader.unread(decl.toCharArray(), 0, len);
return;
}
m_hasHeader = true;
if (utf16) {
< prev index next >