Skip to content

Commit

Permalink
Important! Fixed OBEXObject#getContents()
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricardo Guilherme Schmidt committed Feb 16, 2011
1 parent 31cf409 commit 11cfe8b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file modified bin/JObexFTP2.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/com/lhf/obexftplib/fs/OBEXObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public void setGroupPerm(final String value) {
* @return the contents
*/
public byte[] getContents() {
return contents.toString().getBytes();
return contents.toByteArray();
}

/**
Expand Down

1 comment on commit 11cfe8b

@3esmit
Copy link
Owner

@3esmit 3esmit commented on 11cfe8b Feb 16, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.