|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.jackson.Base64Variants
public final class Base64Variants
Container for commonly used Base64 variants.
Field Summary | |
---|---|
static Base64Variant |
MIME
This variant is what most people would think of "the standard" Base64 encoding. |
static Base64Variant |
MIME_NO_LINEFEEDS
Slightly non-standard modification of MIME which does not
use linefeeds (max line length set to infinite). |
static Base64Variant |
MODIFIED_FOR_URL
This non-standard variant is usually used when encoded data needs to be passed via URLs (such as part of GET request). |
static Base64Variant |
PEM
This variant is the one that predates MIME : it is otherwise
identical, except that it mandates shorter line length. |
Constructor Summary | |
---|---|
Base64Variants()
|
Method Summary | |
---|---|
static Base64Variant |
getDefaultVariant()
Method used to get the default variant ("MIME_NO_LINEFEEDS") for cases where caller does not explicitly specify the variant. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Base64Variant MIME
See wikipedia Base64 entry for details.
Note that although this can be thought of as the standard variant, it is not the default for Jackson: no-linefeeds alternative is because of JSON requirement of escaping all linefeeds.
public static final Base64Variant MIME_NO_LINEFEEDS
MIME
which does not
use linefeeds (max line length set to infinite). Useful when linefeeds
wouldn't work well (possibly in attributes), or for minor space savings
(save 1 linefeed per 76 data chars, ie. ~1.4% savings).
public static final Base64Variant PEM
MIME
: it is otherwise
identical, except that it mandates shorter line length.
public static final Base64Variant MODIFIED_FOR_URL
MIME
variant in multiple ways.
First, no padding is used: this also means that it generally can not
be written in multiple separate but adjacent chunks (which would not
be the usual use case in any case). Also, no linefeeds are used (max
line length set to infinite). And finally, two characters (plus and
slash) that would need quoting in URLs are replaced with more
optimal alternatives (hyphen and underscore, respectively).
Constructor Detail |
---|
public Base64Variants()
Method Detail |
---|
public static Base64Variant getDefaultVariant()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |