Hi Stephan,
> is it possible to code in Restlet, that I create a message
> head, than start to send it and afterwoods start to create
> the entity data (the message body) in one method, without
> creating a new Representation subclass that does it?
> I think not, or does I miss something?
This is easily possible by creating a subclass of OutputRepresentation.
response.setEntity(new OutputRepresentation(){
public void write(OutputStream os){
os.write(...)
os.write(...)
os.write(.. perhaps large data ..)
os.write(...)
os.write(.. more large data ..)
os.write(...)
os.write(...)
};
});
[...]
Best regards,
Jerome