private static int hashBytesIC(byte[] bytes, int start, int bytesLen ) { int max=start+bytesLen; int code=0; for (int i = start; i < max ; i++) { code = code * 31 + Ascii.toLower(bytes[i]); } return code; }
public long getLong() { return Ascii.parseLong(buff, start,end-start); }
public static void intToHexString(Buffer buffer, int i) { intToUnsignedString(buffer, i, 4); }
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(); } }
public int getInt() { return Ascii.parseInt(buff, start,end-start); }
public static int parseInt(char[] b, int off, int len) throws NumberFormatException { int c; if (b == null || len <= 0 || !isDigit(c = b[off++])) { throw new NumberFormatException(); } int n = c - '0'; while (--len > 0) { if (!isDigit(c = b[off++])) { throw new NumberFormatException(); } n = n * 10 + c - '0'; } return n; }
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(); } }
public int getInt() { return Ascii.parseInt(buff, start,end-start); }
public static int parseInt(char[] b, int off, int len) throws NumberFormatException { int c; if (b == null || len <= 0 || !isDigit(c = b[off++])) { throw new NumberFormatException(); } int n = c - '0'; while (--len > 0) { if (!isDigit(c = b[off++])) { throw new NumberFormatException(); } n = n * 10 + c - '0'; } return n; }
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(); } }
private static int hashBytesIC(byte[] bytes, int start, int bytesLen ) { int max=start+bytesLen; int code=0; for (int i = start; i < max ; i++) { code = code * 31 + Ascii.toLower(bytes[i]); } return code; }
public int getInt() { return Ascii.parseInt(buff, start,end-start); }
public static int parseInt(char[] b, int off, int len) throws NumberFormatException { int c; if (b == null || len <= 0 || !isDigit(c = b[off++])) { throw new NumberFormatException(); } int n = c - '0'; while (--len > 0) { if (!isDigit(c = b[off++])) { throw new NumberFormatException(); } n = n * 10 + c - '0'; } return n; }
public long getLong() { return Ascii.parseLong(buff, start,end-start); }
public static void intToHexString(Buffer buffer, int i) { intToUnsignedString(buffer, i, 4); }