public final class BytesValidators extends Object
BytesValidators| Modifier and Type | Method and Description |
|---|---|
static BytesValidator |
and(BytesValidator... validators)
This will execute all passed validators and returns true if all return true (i.e.
|
static BytesValidator |
atLeast(int byteLength)
Checks the length of a byte array
|
static BytesValidator |
atMost(int byteLength)
Checks the length of a byte array
|
static BytesValidator |
endsWith(byte... endsWithBytes)
Checks if the internal byte array ends with given bytes
|
static BytesValidator |
exactLength(int byteLength)
Checks the length of a byte array
|
static BytesValidator |
noneOf(byte refByte)
Checks individual byte content
|
static BytesValidator |
not(BytesValidator validator)
This will negate the result of the passed validator
|
static BytesValidator |
notOnlyOf(byte refByte)
Checks individual byte content
|
static BytesValidator |
onlyOf(byte refByte)
Checks individual byte content
|
static BytesValidator |
or(BytesValidator... validators)
This will execute all passed validators and returns true if at least one returns true (i.e.
|
static BytesValidator |
startsWith(byte... startsWithBytes)
Checks if the internal byte array starts with given bytes
|
public static BytesValidator atLeast(int byteLength)
byteLength - to check againstpublic static BytesValidator atMost(int byteLength)
byteLength - to check againstpublic static BytesValidator exactLength(int byteLength)
byteLength - to check againstpublic static BytesValidator onlyOf(byte refByte)
refByte - to check againstpublic static BytesValidator notOnlyOf(byte refByte)
refByte - to check againstpublic static BytesValidator startsWith(byte... startsWithBytes)
startsWithBytes - the supposed prefixpublic static BytesValidator endsWith(byte... endsWithBytes)
endsWithBytes - the supposed postfixpublic static BytesValidator noneOf(byte refByte)
refByte - to check againstpublic static BytesValidator or(BytesValidator... validators)
validators - at least one validator must be passedpublic static BytesValidator and(BytesValidator... validators)
validators - at least one validator must be passedpublic static BytesValidator not(BytesValidator validator)
validator - to negateCopyright © 2017–2019. All rights reserved.