mirror of
https://github.com/corda/corda.git
synced 2025-05-09 12:02:56 +00:00
add InputStreamReader(InputStream,String)
This commit is contained in:
parent
8411cfbe8f
commit
8bcc78b5b7
@ -16,6 +16,17 @@ public class InputStreamReader extends Reader {
|
|||||||
public InputStreamReader(InputStream in) {
|
public InputStreamReader(InputStream in) {
|
||||||
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];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user