mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
add InputStreamReader(InputStream,String)
This commit is contained in:
@ -16,6 +16,17 @@ public class InputStreamReader extends Reader {
|
||||
public InputStreamReader(InputStream in) {
|
||||
this.in = in;
|
||||
}
|
||||
|
||||
public InputStreamReader(InputStream in, String encoding)
|
||||
throws UnsupportedEncodingException
|
||||
{
|
||||
this(in);
|
||||
|
||||
if (! encoding.equals("UTF-8")) {
|
||||
throw new UnsupportedEncodingException(encoding);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int read(char[] b, int offset, int length) throws IOException {
|
||||
byte[] buffer = new byte[length];
|
||||
|
Reference in New Issue
Block a user