Class OutputStreamWithCSVWriter
- java.lang.Object
-
- java.io.OutputStream
-
- org.nuxeo.ecm.core.io.marshallers.csv.OutputStreamWithCSVWriter
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class OutputStreamWithCSVWriter extends OutputStream
Wrapper forCSVPrinter
.- Since:
- 10.3
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.commons.csv.CSVPrinter
csvPrinter
protected org.apache.commons.io.output.AppendableOutputStream<Appendable>
out
-
Constructor Summary
Constructors Constructor Description OutputStreamWithCSVWriter()
OutputStreamWithCSVWriter(org.apache.commons.csv.CSVPrinter csvPrinter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
flush()
org.apache.commons.csv.CSVPrinter
getCsvPrinter()
Returns the wrapped CSV printer.void
setCSVPrinter(org.apache.commons.csv.CSVPrinter csvPrinter)
String
toString()
void
write(byte[] b)
void
write(byte[] b, int off, int len)
void
write(int i)
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Field Detail
-
out
protected org.apache.commons.io.output.AppendableOutputStream<Appendable> out
-
csvPrinter
protected org.apache.commons.csv.CSVPrinter csvPrinter
-
-
Method Detail
-
setCSVPrinter
public void setCSVPrinter(org.apache.commons.csv.CSVPrinter csvPrinter)
-
write
public void write(int i) throws IOException
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(byte[] b) throws IOException
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOException
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
getCsvPrinter
public org.apache.commons.csv.CSVPrinter getCsvPrinter()
Returns the wrapped CSV printer.- Returns:
- the CSV printer
-
-