90 |
} |
} |
91 |
|
|
92 |
/** Read data from an input stream into a String. |
/** Read data from an input stream into a String. |
93 |
* Most useful for debug output. Encoding is US-ASCII. |
* Most useful for debug output. Default encoding is US-ASCII. |
94 |
*/ |
*/ |
95 |
|
static public String readString(InputStream in, String encoding) throws IOException { |
96 |
|
return new String(readBytes(in), encoding); |
97 |
|
} |
98 |
|
|
99 |
static public String readString(InputStream in) throws IOException { |
static public String readString(InputStream in) throws IOException { |
100 |
return new String(readBytes(in), "US-ASCII"); |
return readString(in, "US-ASCII"); |
101 |
} |
} |
102 |
} |
} |