CharBuffer implements Buffer { @Override public Buffer trim() { int initialStart = offset; int initialEnd = offset + length - 1; int start = initialStart; int end = initialEnd; while (start <= end && buffer[start] <= SPACE) { start++; } while (end >= start && buffer[end] <= SPACE) { end--; } if (start == initialStart && end == initialEnd) { return this; } return subSequence(start - initialStart, end - start + 1); } CharBuffer();  CharBuffer(final int initialSize);  CharBuffer(final char[] buffer, final int off, final int len); @Override void clear(); @Override Buffer trimStart(); @Override Buffer trimEnd(); @Override Buffer trim(); @Override boolean isEmpty(); @Override boolean isBlank(); @Override String toString(); @Override char charAt(final int index); @Override int length(); @Override Buffer subSequence(final int off, final int len); @Override Buffer reverse(); @Override Buffer unsafeCopy(); @Override Buffer copy(); @Override char[] toCharArray(); @Override void move(int increment); @Override void remove(int start, int end); @Override boolean equals(final Object other); @Override int hashCode();  }
@Test void testTrim() throws IOException { addBuffer = null; textInner(); }