/** * Converts the normalized the HTTP request represented by the bytes inside * {@link DataChunk} to chars representation, using the passed encoding. * @param decodedURI - The bytes to decode * @param encoding the encoding value, default is UTF-8. * @throws java.io.CharConversionException */ public static void convertToChars(final DataChunk decodedURI, Charset encoding) throws CharConversionException { if (encoding == null) { encoding = UTF8_CHARSET; } decodedURI.toChars(encoding); // Check that the URI is still normalized if (!checkNormalize(decodedURI.getCharChunk())) { throw new CharConversionException("Invalid URI character encoding"); } }
/** * Converts the normalized the HTTP request represented by the bytes inside * {@link DataChunk} to chars representation, using the passed encoding. * @param decodedURI - The bytes to decode * @param encoding the encoding value, default is UTF-8. * @throws java.io.CharConversionException */ public static void convertToChars(final DataChunk decodedURI, Charset encoding) throws CharConversionException { if (encoding == null) { encoding = UTF8_CHARSET; } decodedURI.toChars(encoding); // Check that the URI is still normalized if (!checkNormalize(decodedURI.getCharChunk())) { throw new CharConversionException("Invalid URI character encoding"); } }
/** * Converts the normalized the HTTP request represented by the bytes inside * {@link DataChunk} to chars representation, using the passed encoding. * @param decodedURI - The bytes to decode * @param encoding the encoding value, default is UTF-8. * @throws java.io.CharConversionException */ public static void convertToChars(final DataChunk decodedURI, Charset encoding) throws CharConversionException { if (encoding == null) { encoding = UTF8_CHARSET; } decodedURI.toChars(encoding); // Check that the URI is still normalized if (!checkNormalize(decodedURI.getCharChunk())) { throw new CharConversionException("Invalid URI character encoding"); } }
/** * Converts the normalized the HTTP request represented by the bytes inside * {@link DataChunk} to chars representation, using the passed encoding. * @param decodedURI - The bytes to decode * @param encoding the encoding value, default is UTF-8. * @throws java.io.CharConversionException */ public static void convertToChars(final DataChunk decodedURI, Charset encoding) throws CharConversionException { if (encoding == null) { encoding = UTF8_CHARSET; } decodedURI.toChars(encoding); // Check that the URI is still normalized if (!checkNormalize(decodedURI.getCharChunk())) { throw new CharConversionException("Invalid URI character encoding"); } }
/** * Map the specified host name and URI, mutating the given mapping data. * * @param host Virtual host name * @param uri URI * @param mappingData This structure will contain the result of the mapping * operation */ public void map(final DataChunk host, final DataChunk uri, final MappingData mappingData) throws Exception { if (host.isNull()) { host.getCharChunk().append(defaultHostName); } else if (host.getLength() == 0) { throw new Exception("Host is not set"); } host.toChars(Constants.DEFAULT_HTTP_CHARSET); uri.toChars(Charsets.UTF8_CHARSET); internalMap(host.getCharChunk(), uri.getCharChunk(), mappingData); }
/** * Map the specified host name and URI, mutating the given mapping data. * * @param host Virtual host name * @param uri URI * @param mappingData This structure will contain the result of the mapping * operation */ public void map(final DataChunk host, final DataChunk uri, final MappingData mappingData) throws Exception { if (host.isNull()) { host.getCharChunk().append(defaultHostName); } else if (host.getLength() == 0) { throw new Exception("Host is not set"); } host.toChars(Constants.DEFAULT_HTTP_CHARSET); uri.toChars(Charsets.UTF8_CHARSET); internalMap(host.getCharChunk(), uri.getCharChunk(), mappingData); }
/** * Map the specified host name and URI, mutating the given mapping data. * * @param host Virtual host name * @param uri URI * @param mappingData This structure will contain the result of the mapping * operation */ public void map(final DataChunk host, final DataChunk uri, final MappingData mappingData) throws Exception { if (host.isNull()) { host.getCharChunk().append(defaultHostName); } else if (host.getLength() == 0) { throw new Exception("Host is not set"); } host.toChars(Constants.DEFAULT_HTTP_CHARSET); uri.toChars(Charsets.UTF8_CHARSET); internalMap(host.getCharChunk(), uri.getCharChunk(), mappingData); }
/** * Converts the normalized the HTTP request represented by the bytes inside * {@link DataChunk} to chars representation, using the passed encoding. * @param decodedURI - The bytes to decode * @param encoding the encoding value, default is UTF-8. * @throws java.io.CharConversionException */ public static void convertToChars(final DataChunk decodedURI, Charset encoding) throws CharConversionException { if (encoding == null) { encoding = UTF8_CHARSET; } decodedURI.toChars(encoding); // Check that the URI is still normalized if (!checkNormalize(decodedURI.getCharChunk())) { throw new CharConversionException("Invalid URI character encoding"); } }
/** * Converts the normalized the HTTP request represented by the bytes inside * {@link DataChunk} to chars representation, using the passed encoding. * @param decodedURI - The bytes to decode * @param encoding the encoding value, default is UTF-8. * @throws java.io.CharConversionException */ public static void convertToChars(final DataChunk decodedURI, Charset encoding) throws CharConversionException { if (encoding == null) { encoding = UTF8_CHARSET; } decodedURI.toChars(encoding); // Check that the URI is still normalized if (!checkNormalize(decodedURI.getCharChunk())) { throw new CharConversionException("Invalid URI character encoding"); } }
/** * Converts the normalized the HTTP request represented by the bytes inside * {@link DataChunk} to chars representation, using the passed encoding. * @param decodedURI - The bytes to decode * @param encoding the encoding value, default is UTF-8. * @throws java.io.CharConversionException */ public static void convertToChars(final DataChunk decodedURI, Charset encoding) throws CharConversionException { if (encoding == null) { encoding = UTF8_CHARSET; } decodedURI.toChars(encoding); // Check that the URI is still normalized if (!checkNormalize(decodedURI.getCharChunk())) { throw new CharConversionException("Invalid URI character encoding"); } }
/** * Converts the normalized the HTTP request represented by the bytes inside * {@link DataChunk} to chars representation, using the passed encoding. * @param decodedURI - The bytes to decode * @param encoding the encoding value, default is UTF-8. * @throws java.io.CharConversionException */ public static void convertToChars(final DataChunk decodedURI, Charset encoding) throws CharConversionException { if (encoding == null) { encoding = UTF8_CHARSET; } decodedURI.toChars(encoding); // Check that the URI is still normalized if (!checkNormalize(decodedURI.getCharChunk())) { throw new CharConversionException("Invalid URI character encoding"); } }
/** * Converts the normalized the HTTP request represented by the bytes inside * {@link DataChunk} to chars representation, using the passed encoding. * @param decodedURI - The bytes to decode * @param encoding the encoding value, default is UTF-8. * @throws java.io.CharConversionException */ public static void convertToChars(final DataChunk decodedURI, Charset encoding) throws CharConversionException { if (encoding == null) { encoding = UTF8_CHARSET; } decodedURI.toChars(encoding); // Check that the URI is still normalized if (!checkNormalize(decodedURI.getCharChunk())) { throw new CharConversionException("Invalid URI character encoding"); } }
/** * Converts the normalized the HTTP request represented by the bytes inside * {@link DataChunk} to chars representation, using the passed encoding. * @param decodedURI - The bytes to decode * @param encoding the encoding value, default is UTF-8. * @throws java.io.CharConversionException */ public static void convertToChars(final DataChunk decodedURI, Charset encoding) throws CharConversionException { if (encoding == null) { encoding = UTF8_CHARSET; } decodedURI.toChars(encoding); // Check that the URI is still normalized if (!checkNormalize(decodedURI.getCharChunk())) { throw new CharConversionException("Invalid URI character encoding"); } }
/** * Map the specified host name and URI, mutating the given mapping data. * * @param host Virtual host name * @param uri URI * @param mappingData This structure will contain the result of the mapping * operation */ public void map(final DataChunk host, final DataChunk uri, final MappingData mappingData) throws Exception { if (host.isNull()) { host.getCharChunk().append(defaultHostName); } else if (host.getLength() == 0) { throw new Exception("Host is not set"); } host.toChars(Constants.DEFAULT_HTTP_CHARSET); uri.toChars(Charsets.UTF8_CHARSET); internalMap(host.getCharChunk(), uri.getCharChunk(), mappingData); }
/** * Map the specified host name and URI, mutating the given mapping data. * * @param host Virtual host name * @param uri URI * @param mappingData This structure will contain the result of the mapping * operation */ public void map(final DataChunk host, final DataChunk uri, final MappingData mappingData) throws Exception { if (host.isNull()) { host.getCharChunk().append(defaultHostName); } else if (host.getLength() == 0) { throw new Exception("Host is not set"); } host.toChars(Constants.DEFAULT_HTTP_CHARSET); uri.toChars(Charsets.UTF8_CHARSET); internalMap(host.getCharChunk(), uri.getCharChunk(), mappingData); }
public void processParameters(final DataChunk data, final Charset encoding) { if (data == null || data.isNull() || data.getLength() <= 0) { return; } try { if (data.getType() == DataChunk.Type.Buffer) { final BufferChunk bc = data.getBufferChunk(); processParameters(bc.getBuffer(), bc.getStart(), bc.getLength(), encoding); } else { if (data.getType() != DataChunk.Type.Chars) { data.toChars(encoding); } final CharChunk cc = data.getCharChunk(); processParameters(cc.getChars(), cc.getStart(), cc.getLength()); } } catch (CharConversionException e) { throw new IllegalStateException(e); } }
public void processParameters(final DataChunk data, final Charset encoding) { if (data == null || data.isNull() || data.getLength() <= 0) { return; } try { if (data.getType() == DataChunk.Type.Buffer) { final BufferChunk bc = data.getBufferChunk(); processParameters(bc.getBuffer(), bc.getStart(), bc.getLength(), encoding); } else { if (data.getType() != DataChunk.Type.Chars) { data.toChars(encoding); } final CharChunk cc = data.getCharChunk(); processParameters(cc.getChars(), cc.getStart(), cc.getLength()); } } catch (CharConversionException e) { throw new IllegalStateException(e); } }
public void processParameters(final DataChunk data, final Charset encoding) { if (data == null || data.isNull() || data.getLength() <= 0) { return; } try { if (data.getType() == DataChunk.Type.Buffer) { final BufferChunk bc = data.getBufferChunk(); processParameters(bc.getBuffer(), bc.getStart(), bc.getLength(), encoding); } else { if (data.getType() != DataChunk.Type.Chars) { data.toChars(encoding); } final CharChunk cc = data.getCharChunk(); processParameters(cc.getChars(), cc.getStart(), cc.getLength()); } } catch (CharConversionException e) { throw new IllegalStateException(e); } }
public void processParameters(final DataChunk data, final Charset encoding) { if (data == null || data.isNull() || data.getLength() <= 0) { return; } try { if (data.getType() == DataChunk.Type.Buffer) { final BufferChunk bc = data.getBufferChunk(); processParameters(bc.getBuffer(), bc.getStart(), bc.getLength(), encoding); } else { if (data.getType() != DataChunk.Type.Chars) { data.toChars(encoding); } final CharChunk cc = data.getCharChunk(); processParameters(cc.getChars(), cc.getStart(), cc.getLength()); } } catch (CharConversionException e) { throw new IllegalStateException(e); } }
public void processParameters(final DataChunk data, final Charset encoding) { if (data == null || data.isNull() || data.getLength() <= 0) { return; } try { if (data.getType() == DataChunk.Type.Buffer) { final BufferChunk bc = data.getBufferChunk(); processParameters(bc.getBuffer(), bc.getStart(), bc.getLength(), encoding); } else { if (data.getType() != DataChunk.Type.Chars) { data.toChars(encoding); } final CharChunk cc = data.getCharChunk(); processParameters(cc.getChars(), cc.getStart(), cc.getLength()); } } catch (CharConversionException e) { throw new IllegalStateException(e); } }