Thread: [Jsdsi-users] 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:02
|
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 |
From: Sean R. <sra...@ae...> - 2004-03-15 16:48:03
|
On Mon, 2004-03-15 at 13:18, Sameer Ajmani wrote: > 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. > My preference is to stick as we are, make sure the documentation (javadoc) highlights the issue and informs developers of how to convert. > 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 > > > > > > ------------------------------------------------------- > 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 -- Dr. Sean Radford, MBBS, MSc sra...@ae... http://www.aegeus-technology.com |
From: Sameer A. <aj...@cs...> - 2004-03-15 16:53:57
|
> My preference is to stick as we are, make sure the documentation > (javadoc) highlights the issue and informs developers of how to convert. This is probably the best plan, as it also avoid breaking existing apps :) Sameer > On Mon, 2004-03-15 at 13:18, Sameer Ajmani wrote: >> 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 >> >> >> >> >> >> ------------------------------------------------------- >> 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 > -- > Dr. Sean Radford, MBBS, MSc > sra...@ae... > http://www.aegeus-technology.com http://ajmani.net |
From: Sean R. <sra...@ae...> - 2004-03-15 17:32:54
|
Just to let you all know - I've committed the convenience methods (with Sexp.decodeString(...) to use 8859_1. Sean On Mon, 2004-03-15 at 16:53, Sameer Ajmani wrote: > > My preference is to stick as we are, make sure the documentation > > (javadoc) highlights the issue and informs developers of how to convert. > > This is probably the best plan, as it also avoid breaking existing apps :) > > Sameer > > > On Mon, 2004-03-15 at 13:18, Sameer Ajmani wrote: > >> 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 > >> > >> > >> > >> > >> > >> ------------------------------------------------------- > >> 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 > > -- > > Dr. Sean Radford, MBBS, MSc > > sra...@ae... > > http://www.aegeus-technology.com > > > http://ajmani.net > -- Dr. Sean Radford, MBBS, MSc sra...@ae... http://www.aegeus-technology.com |