static CharSequenceAdapter copy (CharSequenceAdapter other) { CharSequenceAdapter buf = new CharSequenceAdapter(other.sequence); buf.limit = other.limit; buf.position = other.position; buf.mark = other.mark; return buf; }
/** Returns a new readonly char buffer based on the specified char sequence. * * @param chseq The char sequence * @return A new readonly char buffer based on the specified char sequence. */ public static CharBuffer newCharBuffer (CharSequence chseq) { return new CharSequenceAdapter(chseq); }
/** Returns a new readonly char buffer based on the specified char sequence. * * @param chseq The char sequence * @return A new readonly char buffer based on the specified char sequence. */ public static CharBuffer newCharBuffer (CharSequence chseq) { return new CharSequenceAdapter(chseq); }
static CharSequenceAdapter copy (CharSequenceAdapter other) { CharSequenceAdapter buf = new CharSequenceAdapter(other.sequence); buf.limit = other.limit; buf.position = other.position; buf.mark = other.mark; return buf; }
public CharBuffer slice () { return new CharSequenceAdapter(sequence.subSequence(position, limit)); }
public CharBuffer slice () { return new CharSequenceAdapter(sequence.subSequence(position, limit)); }
/** * Creates a new char buffer by wrapping the given char sequence. * <p> * Calling this method has the same effect as * {@code wrap(chseq, 0, chseq.length())}. * * @param chseq * the char sequence which the new buffer will be based on. * @return the created char buffer. */ public static CharBuffer wrap(CharSequence chseq) { return new CharSequenceAdapter(chseq); }
static CharSequenceAdapter copy(CharSequenceAdapter other) { CharSequenceAdapter buf = new CharSequenceAdapter(other.sequence); buf.limit = other.limit; buf.position = other.position; buf.mark = other.mark; return buf; }
@Override public CharBuffer slice() { return new CharSequenceAdapter(sequence.subSequence(position, limit)); }
/** * Creates a new char buffer by wrapping the given char sequence. * <p> * The new buffer's position will be {@code start}, limit will be * {@code end}, capacity will be the length of the char sequence. The new * buffer is read-only. * * @param cs * the char sequence which the new buffer will be based on. * @param start * the start index, must not be negative and not greater than * {@code cs.length()}. * @param end * the end index, must be no less than {@code start} and no * greater than {@code cs.length()}. * @return the created char buffer. * @exception IndexOutOfBoundsException * if either {@code start} or {@code end} is invalid. */ public static CharBuffer wrap(CharSequence cs, int start, int end) { if (start < 0 || end < start || end > cs.length()) { throw new IndexOutOfBoundsException("cs.length()=" + cs.length() + ", start=" + start + ", end=" + end); } CharBuffer result = new CharSequenceAdapter(cs); result.position = start; result.limit = end; return result; }
static CharSequenceAdapter copy(CharSequenceAdapter other) { CharSequenceAdapter buf = new CharSequenceAdapter(other.sequence); buf.limit = other.limit; buf.position = other.position; buf.mark = other.mark; return buf; }
static CharSequenceAdapter copy(CharSequenceAdapter other) { CharSequenceAdapter buf = new CharSequenceAdapter(other.sequence); buf.limit = other.limit; buf.position = other.position; buf.mark = other.mark; return buf; }
static CharSequenceAdapter copy(CharSequenceAdapter other) { CharSequenceAdapter buf = new CharSequenceAdapter(other.sequence); buf.limit = other.limit; buf.position = other.position; buf.mark = other.mark; return buf; }
static CharSequenceAdapter copy(CharSequenceAdapter other) { CharSequenceAdapter buf = new CharSequenceAdapter(other.sequence); buf.limit = other.limit; buf.position = other.position; buf.mark = other.mark; return buf; }
/** Returns a new readonly char buffer based on the specified char sequence. * * @param chseq The char sequence * @return A new readonly char buffer based on the specified char sequence. */ public static CharBuffer newCharBuffer (CharSequence chseq) { return new CharSequenceAdapter(chseq); }
static CharSequenceAdapter copy(CharSequenceAdapter other) { CharSequenceAdapter buf = new CharSequenceAdapter(other.sequence); buf.limit = other.limit; buf.position = other.position; buf.mark = other.mark; return buf; }
static CharSequenceAdapter copy(CharSequenceAdapter other) { CharSequenceAdapter buf = new CharSequenceAdapter(other.sequence); buf.limit = other.limit; buf.position = other.position; buf.mark = other.mark; return buf; }
/** * Creates a new char buffer by wrapping the given char sequence. * <p> * Calling this method has the same effect as * {@code wrap(chseq, 0, chseq.length())}. * * @param chseq * the char sequence which the new buffer will be based on. * @return the created char buffer. */ public static CharBuffer wrap(CharSequence chseq) { return new CharSequenceAdapter(chseq); }
static CharSequenceAdapter copy(CharSequenceAdapter other) { CharSequenceAdapter buf = new CharSequenceAdapter(other.sequence); buf.limit = other.limit; buf.position = other.position; buf.mark = other.mark; return buf; }
@Override public CharBuffer slice() { return new CharSequenceAdapter(sequence.subSequence(position, limit)); }