< prev index next >
src/java.base/share/classes/sun/net/www/MessageHeader.java
Print this page
*** 40,51 ****
the header that don't have a valid key, but do have
a value (this isn't legal according to the standard,
but lines like this are everywhere). */
public
class MessageHeader {
! private String keys[];
! private String values[];
private int nkeys;
public MessageHeader () {
grow();
}
--- 40,51 ----
the header that don't have a valid key, but do have
a value (this isn't legal according to the standard,
but lines like this are everywhere). */
public
class MessageHeader {
! private String[] keys;
! private String[] values;
private int nkeys;
public MessageHeader () {
grow();
}
*** 443,453 ****
/** Parse and merge a MIME header from an input stream. */
@SuppressWarnings("fallthrough")
public void mergeHeader(InputStream is) throws java.io.IOException {
if (is == null)
return;
! char s[] = new char[10];
int firstc = is.read();
while (firstc != '\n' && firstc != '\r' && firstc >= 0) {
int len = 0;
int keyend = -1;
int c;
--- 443,453 ----
/** Parse and merge a MIME header from an input stream. */
@SuppressWarnings("fallthrough")
public void mergeHeader(InputStream is) throws java.io.IOException {
if (is == null)
return;
! char[] s = new char[10];
int firstc = is.read();
while (firstc != '\n' && firstc != '\r' && firstc >= 0) {
int len = 0;
int keyend = -1;
int c;
*** 480,490 ****
/* continuation */
c = ' ';
break;
}
if (len >= s.length) {
! char ns[] = new char[s.length * 2];
System.arraycopy(s, 0, ns, 0, len);
s = ns;
}
s[len++] = (char) c;
}
--- 480,490 ----
/* continuation */
c = ' ';
break;
}
if (len >= s.length) {
! char[] ns = new char[s.length * 2];
System.arraycopy(s, 0, ns, 0, len);
s = ns;
}
s[len++] = (char) c;
}
< prev index next >