public class XCardDocument.XCardDocumentStreamWriter extends StreamWriter
Modifier and Type | Field and Description |
---|---|
protected Map<String,VCardDataType> |
parameterDataTypes
Defines the names (data types) of the XML elements that are used to hold
each parameter's value.
|
protected VCardVersion |
targetVersion |
addProdId, index, versionStrict
Constructor and Description |
---|
XCardDocumentStreamWriter() |
Modifier and Type | Method and Description |
---|---|
protected void |
_write(VCard vcard,
List<VCardProperty> properties)
Writes a vCard to the stream.
|
void |
close() |
protected VCardVersion |
getTargetVersion()
Gets the version that the next vCard will be written as.
|
void |
registerParameterDataType(String parameterName,
VCardDataType dataType)
Registers the data type of an experimental parameter.
|
protected void |
removeUnsupportedParameters(VCardParameters parameters)
Removes parameters that are not supported by xCard.
|
void |
write(VCard vcard)
Writes a vCard to the stream.
|
getScribeIndex, isAddProdId, isVersionStrict, registerScribe, setAddProdId, setScribeIndex, setVersionStrict
protected final VCardVersion targetVersion
protected final Map<String,VCardDataType> parameterDataTypes
public XCardDocumentStreamWriter()
public void write(VCard vcard)
StreamWriter
write
in class StreamWriter
vcard
- the vCard that is being writtenprotected void _write(VCard vcard, List<VCardProperty> properties) throws IOException
StreamWriter
_write
in class StreamWriter
vcard
- the vCard that is being writtenproperties
- the properties to writeIOException
- if there's a problem writing to the output streampublic void close()
protected VCardVersion getTargetVersion()
StreamWriter
getTargetVersion
in class StreamWriter
protected void removeUnsupportedParameters(VCardParameters parameters)
parameters
- the property parameterspublic void registerParameterDataType(String parameterName, VCardDataType dataType)
parameterName
- the parameter name (e.g. "x-foo")dataType
- the data type or null to removeCopyright © 2012–2023 Michael Angstadt. All rights reserved.