Skip to content

Commit

Permalink
Pull Request #96 made clear that the other method isn't needed elsewhere
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiankirsch committed Feb 13, 2015
1 parent 6f6fe58 commit 826e709
Showing 1 changed file with 2 additions and 10 deletions.
Expand Up @@ -19,16 +19,8 @@ static String streamToString(InputStream in){
}

static InputStream stringToStream(String s, String encoding) throws UnsupportedEncodingException {
if (encoding == null) {
return stringToStream(s);
} else {
return new ByteArrayInputStream(s.getBytes(encoding));
}
}

static InputStream stringToStream(String s) {
InputStream in = new ByteArrayInputStream(s.getBytes());
return in;
byte[] rawData = encoding != null ? s.getBytes(encoding) : s.getBytes();
return new ByteArrayInputStream(rawData);
}

static String readerToString(Reader reader) throws IOException {
Expand Down

0 comments on commit 826e709

Please sign in to comment.