/** * 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 trimLeft() { switch (getType()) { case Bytes: getByteChunk().trimLeft(); break; case Buffer: getBufferChunk().trimLeft(); break; case Chars: getCharChunk().trimLeft(); } }
public void trimLeft() { switch (getType()) { case Bytes: getByteChunk().trimLeft(); break; case Buffer: getBufferChunk().trimLeft(); break; case Chars: getCharChunk().trimLeft(); } }
public void trimLeft() { switch (getType()) { case Bytes: getByteChunk().trimLeft(); break; case Buffer: getBufferChunk().trimLeft(); break; case Chars: getCharChunk().trimLeft(); } }
public void trimLeft() { switch (getType()) { case Bytes: getByteChunk().trimLeft(); break; case Buffer: getBufferChunk().trimLeft(); break; case Chars: getCharChunk().trimLeft(); } }
public void trimLeft() { switch (getType()) { case Bytes: getByteChunk().trimLeft(); break; case Buffer: getBufferChunk().trimLeft(); break; case Chars: getCharChunk().trimLeft(); } }
public void trimLeft() { switch (getType()) { case Bytes: getByteChunk().trimLeft(); break; case Buffer: getBufferChunk().trimLeft(); break; case Chars: getCharChunk().trimLeft(); } }
public void trimLeft() { switch (getType()) { case Bytes: getByteChunk().trimLeft(); break; case Buffer: getBufferChunk().trimLeft(); break; case Chars: getCharChunk().trimLeft(); } }
public void trimLeft() { switch (getType()) { case Bytes: getByteChunk().trimLeft(); break; case Buffer: getBufferChunk().trimLeft(); break; case Chars: getCharChunk().trimLeft(); } }
public void trimLeft() { switch (getType()) { case Bytes: getByteChunk().trimLeft(); break; case Buffer: getBufferChunk().trimLeft(); break; case Chars: getCharChunk().trimLeft(); } }
public void trimLeft() { switch (getType()) { case Bytes: getByteChunk().trimLeft(); break; case Buffer: getBufferChunk().trimLeft(); break; case Chars: getCharChunk().trimLeft(); } }
public static long parseLong(final DataChunk dataChunk) { switch(dataChunk.getType()) { case Buffer: final BufferChunk bc = dataChunk.getBufferChunk(); return parseLong(bc.getBuffer(), bc.getStart(), bc.getLength()); case String: return Long.parseLong(dataChunk.toString()); case Chars: final CharChunk cc = dataChunk.getCharChunk(); return parseLong(cc.getBuffer(), cc.getStart(), cc.getLength()); default: throw new NullPointerException(); } }
public static long parseLong(final DataChunk dataChunk) { switch(dataChunk.getType()) { case Buffer: final BufferChunk bc = dataChunk.getBufferChunk(); return parseLong(bc.getBuffer(), bc.getStart(), bc.getLength()); case String: return Long.parseLong(dataChunk.toString()); case Chars: final CharChunk cc = dataChunk.getCharChunk(); return parseLong(cc.getBuffer(), cc.getStart(), cc.getLength()); default: throw new NullPointerException(); } }
public static long parseLong(final DataChunk dataChunk) { switch(dataChunk.getType()) { case Buffer: final BufferChunk bc = dataChunk.getBufferChunk(); return parseLong(bc.getBuffer(), bc.getStart(), bc.getLength()); case String: return Long.parseLong(dataChunk.toString()); case Chars: final CharChunk cc = dataChunk.getCharChunk(); return parseLong(cc.getBuffer(), cc.getStart(), cc.getLength()); default: throw new NullPointerException(); } }
public static long parseLong(final DataChunk dataChunk) { switch(dataChunk.getType()) { case Buffer: final BufferChunk bc = dataChunk.getBufferChunk(); return parseLong(bc.getBuffer(), bc.getStart(), bc.getLength()); case String: return Long.parseLong(dataChunk.toString()); case Chars: final CharChunk cc = dataChunk.getCharChunk(); return parseLong(cc.getBuffer(), cc.getStart(), cc.getLength()); default: throw new NullPointerException(); } }
public static long parseLong(final DataChunk dataChunk) { switch(dataChunk.getType()) { case Buffer: final BufferChunk bc = dataChunk.getBufferChunk(); return parseLong(bc.getBuffer(), bc.getStart(), bc.getLength()); case String: return Long.parseLong(dataChunk.toString()); case Chars: final CharChunk cc = dataChunk.getCharChunk(); return parseLong(cc.getBuffer(), cc.getStart(), cc.getLength()); default: throw new NullPointerException(); } }
public static long parseLong(final DataChunk dataChunk) { switch(dataChunk.getType()) { case Buffer: final BufferChunk bc = dataChunk.getBufferChunk(); return parseLong(bc.getBuffer(), bc.getStart(), bc.getLength()); case String: return Long.parseLong(dataChunk.toString()); case Chars: final CharChunk cc = dataChunk.getCharChunk(); return parseLong(cc.getBuffer(), cc.getStart(), cc.getLength()); default: throw new NullPointerException(); } }
public static long parseLong(final DataChunk dataChunk) { switch(dataChunk.getType()) { case Buffer: final BufferChunk bc = dataChunk.getBufferChunk(); return parseLong(bc.getBuffer(), bc.getStart(), bc.getLength()); case String: return Long.parseLong(dataChunk.toString()); case Chars: final CharChunk cc = dataChunk.getCharChunk(); return parseLong(cc.getBuffer(), cc.getStart(), cc.getLength()); default: throw new NullPointerException(); } }
public static long parseLong(final DataChunk dataChunk) { switch(dataChunk.getType()) { case Buffer: final BufferChunk bc = dataChunk.getBufferChunk(); return parseLong(bc.getBuffer(), bc.getStart(), bc.getLength()); case String: return Long.parseLong(dataChunk.toString()); case Chars: final CharChunk cc = dataChunk.getCharChunk(); return parseLong(cc.getBuffer(), cc.getStart(), cc.getLength()); default: throw new NullPointerException(); } }
public static long parseLong(final DataChunk dataChunk, final int offset, final int length) { switch(dataChunk.getType()) { case Buffer: final BufferChunk bc = dataChunk.getBufferChunk(); return parseLong(bc.getBuffer(), bc.getStart() + offset, length); case String: return parseLong(dataChunk.toString(), offset, length); case Chars: final CharChunk cc = dataChunk.getCharChunk(); return parseLong(cc.getBuffer(), cc.getStart() + offset, cc.getLength()); default: throw new NullPointerException(); } }