mirror of
https://github.com/corda/corda.git
synced 2025-03-11 23:13:58 +00:00
add InputStreamReader(InputStream,String)
This commit is contained in:
parent
8411cfbe8f
commit
8bcc78b5b7
@ -17,6 +17,17 @@ public class InputStreamReader extends Reader {
|
|||||||
this.in = 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 {
|
public int read(char[] b, int offset, int length) throws IOException {
|
||||||
byte[] buffer = new byte[length];
|
byte[] buffer = new byte[length];
|
||||||
int c = in.read(buffer);
|
int c = in.read(buffer);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user