Permalink
Browse files

Important! Fixed OBEXObject#getContents()

  • Loading branch information...
1 parent 31cf409 commit 11cfe8b2cebaac3c0231b7eb135b96e4d8050e84 @3esmit committed Feb 16, 2011
Showing with 1 addition and 1 deletion.
  1. BIN bin/JObexFTP2.jar
  2. +1 −1 src/com/lhf/obexftplib/fs/OBEXObject.java
View
BIN bin/JObexFTP2.jar
Binary file not shown.
View
2 src/com/lhf/obexftplib/fs/OBEXObject.java
@@ -173,7 +173,7 @@ public void setGroupPerm(final String value) {
* @return the contents
*/
public byte[] getContents() {
- return contents.toString().getBytes();
+ return contents.toByteArray();
}
/**

1 comment on commit 11cfe8b

@3esmit
Owner

Without this change, binary files may be outputed incorrectaly, since toString() in ByteArrayOutputStream may remove some character incompactible bytes.
This is very important and affects all GET operations.

Please sign in to comment.