public class URLCodec extends AbstractByteArrayCodec
| Constructor and Description |
|---|
URLCodec()
Default constructor with the UTF-8 charset.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getDecoded(byte[] aEncodedBuffer)
Decode a byte array.
|
static byte[] |
getDecodedURL(byte[] aEncodedBuffer) |
static byte[] |
getDecodedURL(String sEncodedURL) |
static String |
getDecodedURLString(String sEncodedURL,
Charset aDestCharset) |
static BitSet |
getDefaultBitSet() |
byte[] |
getEncoded(byte[] aDecodedBuffer)
Encode a byte array.
|
static byte[] |
getEncodedURL(BitSet aPrintableBitSet,
byte[] aDecodedBuffer) |
static byte[] |
getEncodedURL(byte[] aDecodedBuffer) |
static String |
getEncodedURLString(BitSet aPrintableBitSet,
byte[] aDecodedBuffer) |
static String |
getEncodedURLString(BitSet aPrintableBitSet,
String sDecodedURL,
Charset aSourceCharset) |
static String |
getEncodedURLString(byte[] aDecodedBuffer) |
static String |
getEncodedURLString(String sDecodedURL,
Charset aSourceCharset) |
static void |
writeEncodedURLByte(int b,
NonBlockingByteArrayOutputStream aBAOS)
Encodes byte into its URL representation.
|
getEncodedgetDecodedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDecoded@Nonnull @ReturnsMutableCopy public static BitSet getDefaultBitSet()
null.public static final void writeEncodedURLByte(int b,
@Nonnull
NonBlockingByteArrayOutputStream aBAOS)
b - byte to encodeaBAOS - the buffer to write to@Nullable @ReturnsMutableCopy public static byte[] getEncodedURL(@Nonnull BitSet aPrintableBitSet, @Nullable byte[] aDecodedBuffer)
@Nullable @ReturnsMutableCopy public static byte[] getEncodedURL(@Nullable byte[] aDecodedBuffer)
@Nullable @ReturnsMutableCopy public byte[] getEncoded(@Nullable byte[] aDecodedBuffer)
IByteArrayEncoderaDecodedBuffer - The byte array to be encoded. May be null.null if the parameter was
null.@Nullable @ReturnsMutableCopy public static byte[] getDecodedURL(@Nullable byte[] aEncodedBuffer)
@Nullable @ReturnsMutableCopy public static byte[] getDecodedURL(@Nullable String sEncodedURL)
@Nullable @ReturnsMutableCopy public byte[] getDecoded(@Nullable byte[] aEncodedBuffer)
IByteArrayDecoderaEncodedBuffer - The byte array to be decoded. May not be null.null if the parameter was
null.@Nullable public static String getEncodedURLString(@Nonnull BitSet aPrintableBitSet, @Nonnull byte[] aDecodedBuffer)
@Nullable public static String getEncodedURLString(@Nonnull byte[] aDecodedBuffer)
@Nullable public static String getEncodedURLString(@Nonnull BitSet aPrintableBitSet, @Nullable String sDecodedURL, @Nonnull Charset aSourceCharset)
@Nullable public static String getEncodedURLString(@Nullable String sDecodedURL, @Nonnull Charset aSourceCharset)
Copyright © 2014–2015 Philip Helger. All rights reserved.