Skip to content

Commit

Permalink
Ensuring that getBytes() always uses ASCII
Browse files Browse the repository at this point in the history
  • Loading branch information
djspiewak committed Apr 9, 2010
1 parent e8f6d29 commit 5fe0640
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/com/googlecode/jbencode/primitive/IntegerType.java
Expand Up @@ -20,6 +20,6 @@ public IntegerType(long value) {


@Override @Override
protected void writeValue(OutputStream os) throws IOException { protected void writeValue(OutputStream os) throws IOException {
os.write(Long.toString(value).getBytes()); os.write(Long.toString(value).getBytes("US-ASCII"));
} }
} }
Expand Up @@ -25,7 +25,7 @@ protected void writePrefix(OutputStream os) throws IOException {
} }


protected final void writeLength(OutputStream os) throws IOException { protected final void writeLength(OutputStream os) throws IOException {
os.write(Long.toString(getLength()).getBytes()); os.write(Long.toString(getLength()).getBytes("US-ASCII"));
os.write(':'); os.write(':');
} }


Expand Down

0 comments on commit 5fe0640

Please sign in to comment.