Paul,

2007/11/24, Paul J. Lucas <[EMAIL PROTECTED]>:
>
> OK, so I want to convert an entity having the MediaType of
> TEXT_URI_LIST into an Object, say a List<String> where each URL is an
> element of the list.  I derive from ConverterService and override
> toObject().  Inside that method, I want to read the representation
> line-by-line, so I call Representation.toStream() then use an
> InputStreamReader and a BufferedReader.


Note that in Restlet 1.1, any representation can expose its content directly
via a character Reader or a Writer.

But what do I do about IOExceptions?  The toObject() method is
> declared to throw no exceptions.  Or if I catch the exceptions
> myself, I have no way to call setStatus() on the response to indicate
> that the conversion failed any why.


See previous emails.

The ConverterService API doesn't seem that useable.


Agreed, try to move your logic into your Resource subclasses.

Thanks,
Jerome

Reply via email to