AW: FOP and Sockets

2001-10-11 Thread Beer, Christian

I had the same problem parsing xml directly out of a zip, where
the xml-parser also closes the whole stream. 

I did it this way:
I wrote this class:

public class NonClosingInputStream extends FilterInputStream {
  public NonClosingInputStream(InputStream in) {
super(in);
  }

  public void close() {
  }
}


and put it between the InputStream and the parser.

That works fine. But remember to close the stream at the end!

Christian

-Ursprüngliche Nachricht-
Von: Hinrich.Boog [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 9. Oktober 2001 15:17
An: [EMAIL PROTECTED]
Betreff: FOP and Sockets


I mailed some similar message some weeks ago, but now I had a closer look at
my Sockets:

The task I want to do is to buidl a "RenderingServer".

1.  opening a socket and make the FOP-Renderer listen
2.  send some xsl:fo file over it
3.  get it redered by the server
4.  send it back over the socket.

The point 1 & 2 work fine. I open a clientSocket and pass it inside an
InputSource to the
Driver.


//here are come code bits

Socket clientsocket;

DataInputStream in = new DataInputStream(clientsocket.getInputStream());
OutputStream out = clientSocket.getOutputStream();

InputSource is = new InputSource(in);

Driver driver = new Driver(is, temp);
driver.setOutputStream(out);

driver.run();


The main problem is, that the Driver seems to close down THE WHOLE socket
after reading the
inputData. Somehow I want to tell him "leave my outputStream open until the
redering is
finished".


Has anyone an idea, how to handle this ?

Thanks
Hinrich



Hinrich Boog, [EMAIL PROTECTED]
Infopark AG
Kitzingstr. 15, D-12277 Berlin, Germany
Tel +49(0)-30-747.993.0, Fax +49(0)-30-747.993.93
http://www.infopark.de/




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




FOP and Sockets

2001-10-11 Thread Hinrich.Boog

I mailed some similar message some weeks ago, but now I had a closer look at my 
Sockets:

The task I want to do is to buidl a "RenderingServer".

1.  opening a socket and make the FOP-Renderer listen
2.  send some xsl:fo file over it
3.  get it redered by the server
4.  send it back over the socket.

The point 1 & 2 work fine. I open a clientSocket and pass it inside an InputSource to 
the
Driver.


//here are come code bits

Socket clientsocket;

DataInputStream in = new DataInputStream(clientsocket.getInputStream());
OutputStream out = clientSocket.getOutputStream();

InputSource is = new InputSource(in);

Driver driver = new Driver(is, temp);
driver.setOutputStream(out);

driver.run();


The main problem is, that the Driver seems to close down THE WHOLE socket after 
reading the
inputData. Somehow I want to tell him "leave my outputStream open until the redering is
finished".


Has anyone an idea, how to handle this ?

Thanks
Hinrich



Hinrich Boog, [EMAIL PROTECTED]
Infopark AG
Kitzingstr. 15, D-12277 Berlin, Germany
Tel +49(0)-30-747.993.0, Fax +49(0)-30-747.993.93
http://www.infopark.de/




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]