@FunctionalInterface public interface ICharArrayStreamEncoder extends ICharArrayEncoder
| Modifier and Type | Method and Description |
|---|---|
void |
encode(char[] aDecodedBuffer,
int nOfs,
int nLen,
Writer aWriter)
Encode (part of) a char array to an
Writer. |
default void |
encode(char[] aDecodedBuffer,
Writer aWriter)
Encode a char array to a
Writer. |
default char[] |
getEncoded(char[] aDecodedBuffer)
Encode a char array.
|
default char[] |
getEncoded(char[] aDecodedBuffer,
int nOfs,
int nLen)
Encode a char array.
|
default char[] |
getEncoded(String sDecoded)
Encode the passed string.
|
default String |
getEncodedAsString(char[] aDecodedBuf) |
default String |
getEncodedAsString(char[] aDecodedBuf,
int nOfs,
int nLen) |
default String |
getEncodedAsString(String sDecoded)
Encode the passed string and return the result as a String.
|
default int |
getMaximumEncodedLength(int nDecodedLen)
Get the maximum encoded length based on the provided decoded length.
|
@Nonnegative default int getMaximumEncodedLength(@Nonnegative int nDecodedLen)
ICharArrayEncodergetMaximumEncodedLength in interface ICharArrayEncodernDecodedLen - The decoded length. Always ≥ 0.default void encode(@Nullable char[] aDecodedBuffer, @Nonnull @WillNotClose Writer aWriter)
Writer.aDecodedBuffer - The char array to be encoded. May be null.aWriter - The writer to write to. May not be null and is NOT
closed afterwards!EncodeException - In case something goes wrongvoid encode(@Nullable char[] aDecodedBuffer, @Nonnegative int nOfs, @Nonnegative int nLen, @Nonnull @WillNotClose Writer aWriter)
Writer.aDecodedBuffer - The char array to be encoded. May be null.nOfs - Offset into the char array to start from.nLen - Number of chars starting from offset to consider.aWriter - The writer to write to. May not be null and is NOT
closed afterwards!EncodeException - In case something goes wrong@Nullable @ReturnsMutableCopy default char[] getEncoded(@Nullable char[] aDecodedBuffer)
getEncoded in interface ICharArrayEncodergetEncoded in interface IEncoder<char[],char[]>aDecodedBuffer - The char array to be encoded. May be null.null if the parameter was
null.EncodeException - In case something goes wrong@Nullable @ReturnsMutableCopy default char[] getEncoded(@Nullable char[] aDecodedBuffer, @Nonnegative int nOfs, @Nonnegative int nLen)
getEncoded in interface ICharArrayEncoderaDecodedBuffer - The char array to be encoded. May be null.nOfs - Offset into the char array to start from.nLen - Number of chars starting from offset to consider.null if the parameter was
null.EncodeException - In case something goes wrong@Nullable @ReturnsMutableCopy default char[] getEncoded(@Nullable String sDecoded)
getEncoded in interface ICharArrayEncodersDecoded - The string to be encoded. May be null.null if the input string is null.EncodeException - In case something goes wrong@Nullable default String getEncodedAsString(@Nullable char[] aDecodedBuf, @Nonnegative int nOfs, @Nonnegative int nLen)
@Nullable default String getEncodedAsString(@Nullable String sDecoded)
sDecoded - The string to be encoded. May be null.null if the input string is null.EncodeException - In case something goes wrongCopyright © 2014–2019 Philip Helger. All rights reserved.