public enum FormatVersion extends java.lang.Enum<FormatVersion>
The format version ensures compatibility between the writer and the reader (i.e. should be equal).
Enum Constant and Description |
---|
PALDB_V1 |
Modifier and Type | Method and Description |
---|---|
static FormatVersion |
fromBytes(byte[] bytes)
Get a version based on bytes or return null if not found.
|
byte[] |
getBytes()
Return the byte representation of this format version.
|
static FormatVersion |
getLatestVersion()
Return the latest version of the format.
|
static byte[] |
getPrefixBytes()
Returns the byte representation of the version prefix.
|
boolean |
is(FormatVersion fv)
Returns true if
fv is equals to this . |
static FormatVersion |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static FormatVersion[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FormatVersion PALDB_V1
public static FormatVersion[] values()
for (FormatVersion c : FormatVersion.values()) System.out.println(c);
public static FormatVersion valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic boolean is(FormatVersion fv)
fv
is equals to this
.fv
- a format versionfv
is equals to this
enumpublic byte[] getBytes()
public static FormatVersion fromBytes(byte[] bytes)
bytes
- byte representationpublic static byte[] getPrefixBytes()
public static FormatVersion getLatestVersion()