[Jsdsi-devel] should transport form be a string by default?
Status: Pre-Alpha
Brought to you by:
sajma
|
From: Sameer A. <aj...@cs...> - 2004-03-15 13:19:01
|
The purpose of transport form is to provide a concise, 7-bit clean encoding of a canonical S-expression. But most JSDSI methods that read or write transport form use a byte array or OutputStream instead of a String or Writer. Should we change transport form methods to use Strings and Writers? Note that one can always use Sexp.decodeString() and OutputStreamWriter to bridge between the two forms. Sameer > Just one change: > >> ByteArrayOutputStream baos = new ByteArrayOutputStream(); >> this.toSexp().writeTransport(baos); >> return baos.toString(); > > This call to toString() uses the platform's default encoding, but SPKI > requires 8859_1. Perhaps use Sexp.decodeString(baos.toByteArray()); > > Sameer > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Jsdsi-devel mailing list > Jsd...@li... > https://lists.sourceforge.net/lists/listinfo/jsdsi-devel http://ajmani.net |