public class RFC2616Codec extends Object implements ICharArrayCodec
| Constructor and Description |
|---|
RFC2616Codec() |
| Modifier and Type | Method and Description |
|---|---|
void |
decode(char[] aEncodedBuffer,
int nOfs,
int nLen,
Writer aWriter)
Decode (part of) a char array.
|
void |
encode(char[] aDecodedBuffer,
int nOfs,
int nLen,
Writer aWriter)
Encode (part of) a char array to an
Writer. |
int |
getMaximumDecodedLength(int nEncodedLen)
Get the maximum decoded length based on the provided encoded length.
|
int |
getMaximumEncodedLength(int nDecodedLen)
Get the maximum encoded length based on the provided decoded length.
|
static boolean |
isMaybeEncoded(char[] s) |
static boolean |
isMaybeEncoded(String s) |
static boolean |
isToken(char[] aChars) |
static boolean |
isToken(String s) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdecode, getDecoded, getDecodedAsString, getDecodedAsString, getDecodedAsStringgetDecoded, getDecodedencode, getEncoded, getEncoded, getEncoded, getEncodedAsString, getEncodedAsString, getEncodedAsStringpublic static boolean isToken(@Nullable char[] aChars)
public static boolean isMaybeEncoded(@Nullable char[] s)
@Nonnegative public int getMaximumEncodedLength(@Nonnegative int nDecodedLen)
ICharArrayEncodergetMaximumEncodedLength in interface ICharArrayEncodergetMaximumEncodedLength in interface ICharArrayStreamEncodernDecodedLen - The decoded length. Always ≥ 0.public void encode(@Nullable char[] aDecodedBuffer, @Nonnegative int nOfs, @Nonnegative int nLen, @Nonnull @WillNotClose Writer aWriter)
ICharArrayStreamEncoderWriter.encode in interface ICharArrayStreamEncoderaDecodedBuffer - 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!@Nonnegative public int getMaximumDecodedLength(@Nonnegative int nEncodedLen)
ICharArrayDecodergetMaximumDecodedLength in interface ICharArrayDecodernEncodedLen - The encoded length. Always ≥ 0.public void decode(@Nullable char[] aEncodedBuffer, @Nonnegative int nOfs, @Nonnegative int nLen, @Nonnull @WillNotClose Writer aWriter)
ICharArrayStreamDecoderdecode in interface ICharArrayStreamDecoderaEncodedBuffer - The char array to be decoded. 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!Copyright © 2014–2022 Philip Helger. All rights reserved.