@NotThreadSafe public class ExporterJSON extends Object implements IExporterFile
IExporterFile for JSON files| Modifier and Type | Field and Description |
|---|---|
static String |
ATTR_TYPE |
static String |
ATTR_VALUE |
static boolean |
DEFAULT_EMIT_TYPE |
static String |
ELEMENT_BODY |
static String |
ELEMENT_FOOTER |
static String |
ELEMENT_HEADER |
| Constructor and Description |
|---|
ExporterJSON() |
| Modifier and Type | Method and Description |
|---|---|
com.helger.json.IJsonObject |
convertRecords(IExportRecordProvider aProvider) |
com.helger.commons.state.ESuccess |
exportRecords(IExportRecordProvider aProvider,
OutputStream aOS)
Export all provided records to an output stream.
|
Charset |
getCharset() |
EExchangeFileType |
getFileType() |
com.helger.json.serialize.IJsonWriterSettings |
getJsonWriterSettings() |
boolean |
isEmitType() |
com.helger.json.serialize.JsonWriterSettings |
jsonWriterSettings() |
ExporterJSON |
setCharset(Charset aCharset) |
ExporterJSON |
setEmitType(boolean bEmitType) |
ExporterJSON |
setJsonWriterSettings(com.helger.json.serialize.JsonWriterSettings aJWS) |
public static final boolean DEFAULT_EMIT_TYPE
public static final String ELEMENT_HEADER
public static final String ELEMENT_BODY
public static final String ELEMENT_FOOTER
public static final String ATTR_TYPE
public static final String ATTR_VALUE
@Nonnull public final EExchangeFileType getFileType()
getFileType in interface IExporterFile@Nonnull public final ExporterJSON setCharset(@Nonnull Charset aCharset)
@Nonnull @ReturnsMutableObject public final com.helger.json.serialize.JsonWriterSettings jsonWriterSettings()
@Nonnull @ReturnsImmutableObject public final com.helger.json.serialize.IJsonWriterSettings getJsonWriterSettings()
@Nonnull public final ExporterJSON setJsonWriterSettings(@Nonnull com.helger.json.serialize.JsonWriterSettings aJWS)
public final boolean isEmitType()
@Nonnull public final ExporterJSON setEmitType(boolean bEmitType)
@Nullable public com.helger.json.IJsonObject convertRecords(@Nonnull IExportRecordProvider aProvider)
@Nonnull public com.helger.commons.state.ESuccess exportRecords(@Nonnull IExportRecordProvider aProvider, @Nonnull @WillClose OutputStream aOS)
IExporterexportRecords in interface IExporteraProvider - The provider for all records. May not be null.aOS - The output stream to write to. Will be closed automatically in any
case. May not be null.ESuccess.SUCCESS if at lease one record was provided and
saving was successful.Copyright © 2014–2023 Philip Helger. All rights reserved.