/** * Find a map element given its name in a sorted array of map elements. * This will return the index for the closest inferior or equal item in the * given array. */ private static int findIgnoreCase(MapElement[] map, CharChunk name) { return findIgnoreCase(map, name, name.getStart(), name.getEnd()); }
@Override public String toString(int start, int end) { if (start == this.start && end == this.end) { return toString(); } else if (null == buff) { return null; } else if (end - start == 0) { return ""; } return new String(buff, this.start + start, end - start); }
private void setCharsInternal(final char[] chars, final int position, final int limit) { charChunk.setChars(chars, position, limit - position); switchToCharChunk(); }
public boolean isNull() { // should we check also hasStrValue ??? return byteC.isNull() && charC.isNull() && ! hasStrValue; // bytes==null && strValue==null; }
protected DataChunk() { this(new ByteChunk(), new BufferChunk(), new CharChunk(), null); }
/** Append a string to the buffer */ public void append(String s) throws IOException { if (s != null) { append(s, 0, s.length()); } }
/** * Sets the <tt>DataChunk</tt> end position. * * @param end the <tt>DataChunk</tt> end position. */ @Override public void setEnd(int end) { switch (type) { case Bytes: byteChunk.setEnd(end); break; case Buffer: bufferChunk.setEnd(end); break; case Chars: charChunk.setEnd(end); break; default: break; } }
private void setCharsInternal(final char[] chars, final int position, final int limit) { charChunk.setChars(chars, position, limit - position); switchToCharChunk(); }
public boolean isNull() { // should we check also hasStrValue ??? return byteC.isNull() && charC.isNull() && ! hasStrValue; // bytes==null && strValue==null; }
protected DataChunk() { this(new ByteChunk(), new BufferChunk(), new CharChunk(), null); }
/** Append a string to the buffer */ public void append(String s) throws IOException { if (s != null) { append(s, 0, s.length()); } }
/** * Sets the <tt>DataChunk</tt> end position. * * @param end the <tt>DataChunk</tt> end position. */ @Override public void setEnd(int end) { switch (type) { case Bytes: byteChunk.setEnd(end); break; case Buffer: bufferChunk.setEnd(end); break; case Chars: charChunk.setEnd(end); break; default: break; } }