Consumes remaining contents of this object, and returns them as a string.
()
| 84 | |
| 85 | /** Consumes remaining contents of this object, and returns them as a string. */ |
| 86 | public String toString() { |
| 87 | Charset cset = Charset.forName("UTF-8"); |
| 88 | CharBuffer cb = cset.decode(ByteBuffer.wrap(this.toArray())); |
| 89 | return cb.toString(); |
| 90 | } |
| 91 | |
| 92 | /** Consumes remaining contents of this object, and returns them as a byte array. */ |
| 93 | public byte[] toArray() { |