How to get text from a SharedByteArrayInputStream

When I get a BodyPart that's an instance of com.sun.mail.util.SharedByteArrayInputStream, how do I retrieve the text from this stream? Treating it as an InputStream and reading the bytes into a buffer yeilds what looks like gibberish. Anybody know how to do this?

Any help would be appreciated!

thanks,

bear

[347 byte] By [bootedbear] at [2007-9-26 2:12:05]
# 1
You cast the SharedByteArrayInputStream into ByteArrayInputStream and read the data into a byte[].Then construct a new String with the byte[].
tchia at 2007-6-29 9:04:55 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...