public class TapeArchiveChartWriter extends AbstractArchiveChartWriter
AbstractArchiveChartWriter that saves ChartOuterClass.ChartOrBuilder objects to a supplied
OutputStream in TAR
format, using a TarOutputStream internally.AbstractChartWriter.Context| 构造器和说明 |
|---|
TapeArchiveChartWriter(OutputStream outputStream)
Creates a new
TapeArchiveChartWriter. |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Closes this
TapeArchiveChartWriter by closing its
underlying TarOutputStream. |
protected void |
writeEntry(AbstractChartWriter.Context context,
String path,
String contents)
Creates a new
TarHeader and a TarEntry wrapping
it and writes it and the supplied contents to the
underlying TarOutputStream. |
beginWrite, endWrite, writeConfig, writeFile, writeMetadata, writeTemplatecreateYaml, toYAML, write, write, writeSubchartpublic TapeArchiveChartWriter(OutputStream outputStream)
TapeArchiveChartWriter.outputStream - the OutputStream to write to; must
not be null and should be buffered at some levelAbstractArchiveChartWriter.AbstractArchiveChartWriter(),
TarOutputStream.TarOutputStream(OutputStream)protected void writeEntry(AbstractChartWriter.Context context, String path, String contents) throws IOException
TarHeader and a TarEntry wrapping
it and writes it and the supplied contents to the
underlying TarOutputStream.writeEntry 在类中 AbstractArchiveChartWritercontext - the Context describing the write operation
in effect; must not be nullpath - the path within a tape archive to write; interpreted
as being relative to the current chart path; must not be null or emptycontents - the contents to write; must not be nullIOException - if a write error occursNullPointerException - if context, path
or contents is nullIllegalArgumentException - if path is emptypublic void close()
throws IOException
TapeArchiveChartWriter by closing its
underlying TarOutputStream. This TapeArchiveChartWriter cannot be used again.IOException - if there was a problem closing the
underlying TarOutputStreamCopyright © 2021. All rights reserved.