Package org.somda.sdc.dpws.helper
Class CommunicationLogFileOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.somda.sdc.dpws.helper.CommunicationLogFileOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class CommunicationLogFileOutputStream extends OutputStream
OutputStream that buffers written bytes and performs post-processing.This stream implementation buffers written output to a byte array and writes a file once the stream is closed. During the post-processing step the CommunicationLogFileOutputStream does the following:
- Tries to extract the SOAP action and writes the last part of the action to the file name in order to facilitate users to get an idea which contents are enclosed by a communication log file.
- Pretty-prints the XML data.
-
-
Constructor Summary
Constructors Constructor Description CommunicationLogFileOutputStream(File targetDirectory, String fileNamePrefix, boolean prettyPrint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()voidwrite(byte[] b, int off, int len)voidwrite(int b)-
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
-
-
-
Method Detail
-
write
public void write(int b)
- Specified by:
writein classOutputStream
-
write
public void write(byte[] b, int off, int len) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
-