Hi all ,
I added geronimo-javamail_1.3.1_spec-1.0.jar into the
classpath and compiled a standalone java class with
the following code. All I am trying here is to convert
a base 64 version of a string using the MimeUtility
class provided by javamail(in this case the jar
specified holds this class).
I find that the same value is returned instead of the
the decoded value. I tried placing the javamails 1.3.1
version of jar file and it converted properly.
This is a test program taht I have written before I
add it to a class that will run in Geronimo.
Please let me know as to what I am doing wrong here or
if there is somethign wrong with javamail provided by
Geronimo.
Thanks,
Priya
String userpassEncoded = "dXNlcjE6c3lzdGVt";
ByteArrayInputStream stringBufferstrema = new
ByteArrayInputStream(userpassEncoded.getBytes());
InputStream is =
MimeUtility.decode(stringBufferstrema,"base64");
InputStream theDecodedStream =
MimeUtility.decode(stringBufferstrema,"base64");
String theText = "";
int theByte;
while ((theByte = theDecodedStream.read())
!= -1)
{
theText += (char)theByte;
}
System.out.println(theText);
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com