Package com.floragunn.codova.documents
Class Format
- java.lang.Object
-
- com.floragunn.codova.documents.Format
-
public class Format extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFormat.Encodingstatic classFormat.UnknownDocTypeException
-
Constructor Summary
Constructors Constructor Description Format(String name, Format.Encoding encoding, com.fasterxml.jackson.core.JsonFactory jsonFactory, String fileNameSuffixPattern, String mediaType, String... mediaTypeAliases)Format(String name, Format.Encoding encoding, String jsonFactoryClass, String fileNameSuffixPattern, String mediaType, String... mediaTypeAliases)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FormatgetByContentType(String contentType)static FormatgetByFileName(String fileName)static FormatgetByFileName(String fileName, Format fallbackDocType)static FormatgetByMediaType(String mediaType)ContentTypegetContentType()Set<String>getContentTypeAliases()CharsetgetDefaultCharset()com.fasterxml.jackson.core.JsonFactorygetJsonFactory()StringgetMediaType()StringgetName()booleanisBinary()static FormatpeekByContentType(String contentType)StringtoString()
-
-
-
Constructor Detail
-
Format
public Format(String name, Format.Encoding encoding, com.fasterxml.jackson.core.JsonFactory jsonFactory, String fileNameSuffixPattern, String mediaType, String... mediaTypeAliases)
-
-
Method Detail
-
getByContentType
public static Format getByContentType(String contentType) throws Format.UnknownDocTypeException
- Throws:
Format.UnknownDocTypeException
-
getByFileName
public static Format getByFileName(String fileName) throws Format.UnknownDocTypeException
- Throws:
Format.UnknownDocTypeException
-
getByMediaType
public static Format getByMediaType(String mediaType) throws Format.UnknownDocTypeException
- Throws:
Format.UnknownDocTypeException
-
getMediaType
public String getMediaType()
-
getContentType
public ContentType getContentType()
-
getJsonFactory
public com.fasterxml.jackson.core.JsonFactory getJsonFactory()
-
getName
public String getName()
-
isBinary
public boolean isBinary()
-
getDefaultCharset
public Charset getDefaultCharset()
-
-