Package io.permazen.encoding
Class ByteEncoding
java.lang.Object
- All Implemented Interfaces:
Encoding<Byte>
,NaturalSortAware
,Serializable
,Comparator<Byte>
byte
primitive type.- See Also:
-
Field Summary
Fields inherited from class io.permazen.encoding.AbstractEncoding
encodingId, typeToken
Fields inherited from interface io.permazen.encoding.Encoding
MAX_ARRAY_DIMENSIONS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Byte
convertNumber
(Number value) protected Byte
downCast
(long value) withEncodingId
(EncodingId encodingId) Build an encoding that has the givenEncodingId
but is otherwise equivalent to this encoding.Methods inherited from class io.permazen.encoding.IntegralEncoding
hasPrefix0x00, hasPrefix0xff, read, skip, upCast, write
Methods inherited from class io.permazen.encoding.PrimitiveEncoding
compare, convert, equals, fromString, hashCode, sortsNaturally, toString, validate
Methods inherited from class io.permazen.encoding.AbstractEncoding
getDefaultValueObject, getEncodingId, getTypeToken, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
Methods inherited from interface io.permazen.encoding.Encoding
decode, encode, getDefaultValue, getKeyRange, supportsNull, validateAndWrite
-
Constructor Details
-
ByteEncoding
-
-
Method Details
-
withEncodingId
Description copied from interface:Encoding
Build an encoding that has the givenEncodingId
but is otherwise equivalent to this encoding.If this encoding already has
encodingId
, then this method may (but is not required to) return this same instance.- Parameters:
encodingId
- new encoding'sEncodingId
, or null for an anonymized encoding- Returns:
- a version of this encoding with the given
EncodingId
-
convertNumber
- Specified by:
convertNumber
in classPrimitiveEncoding<Byte>
-
downCast
- Specified by:
downCast
in classIntegralEncoding<Byte>
-