On 18 May 2007, at 21:07, Philip Johnson wrote:
public void put(Representation entity) {
System.out.println(entity.getText());
System.out.println(entity.getText());
The first call to getText() would basically do a getStream() and read
all the data until the end, and return as a
@restlet.tigris.org
Objet : Re: Can't call Representation.getText() or getStream() twice?
Thank you Theirry and Jerome for the lightening quick
responses! I see the
rationale for the behavior now.
It might be helpful to document this behavior more clearly in
the JavaDoc at
some point, maybe
Hello Philip,
the getText() method reads entirely the underlining stream in order to
build a String object. That means that you can only call this method once.
However, I don't know if this behaviour is expected or appropriate.
I hope I answer your question.
Best regards,
Thierry Boileau
3 matches
Mail list logo