public class SimpleDocumentFormatRegistry extends Object implements DocumentFormatRegistry
| Constructor and Description |
|---|
SimpleDocumentFormatRegistry() |
| Modifier and Type | Method and Description |
|---|---|
void |
addFormat(@NonNull DocumentFormat documentFormat)
Add a new format to the registry.
|
@Nullable DocumentFormat |
getFormatByExtension(@NonNull String extension)
Gets a document format for the specified extension.
|
@Nullable DocumentFormat |
getFormatByMediaType(@NonNull String mediaType)
Gets a document format for the specified media type.
|
@NonNull Set<DocumentFormat> |
getOutputFormats(@NonNull DocumentFamily documentFamily)
Gets all the
DocumentFormats of a given family. |
public void addFormat(@NonNull DocumentFormat documentFormat)
documentFormat - The format to add.public @Nullable DocumentFormat getFormatByExtension(@NonNull String extension)
DocumentFormatRegistrygetFormatByExtension in interface DocumentFormatRegistryextension - The extension whose document format will be returned.null if no document format exists for the
specified extension.public @Nullable DocumentFormat getFormatByMediaType(@NonNull String mediaType)
DocumentFormatRegistrygetFormatByMediaType in interface DocumentFormatRegistrymediaType - The media type whose document format will be returned.null if no document format exists for the
specified media type.public @NonNull Set<DocumentFormat> getOutputFormats(@NonNull DocumentFamily documentFamily)
DocumentFormatRegistryDocumentFormats of a given family.getOutputFormats in interface DocumentFormatRegistrydocumentFamily - The family whose document formats will be returned.Copyright © 2016 - present; JODConverter.org. All rights reserved.