/** * {@inheritDoc} */ @Override public String toString() { StringBuilder buf = new StringBuilder(); if (isDirect()) { buf.append("DirectBuffer"); } else { buf.append("HeapBuffer"); } buf.append("[pos="); buf.append(position()); buf.append(" lim="); buf.append(limit()); buf.append(" cap="); buf.append(capacity()); buf.append(": "); buf.append(getHexDump(16)); buf.append(']'); return buf.toString(); }
/** * {@inheritDoc} */ @Override public String toString() { StringBuilder buf = new StringBuilder(); if (isDirect()) { buf.append("DirectBuffer"); } else { buf.append("HeapBuffer"); } buf.append("[pos="); buf.append(position()); buf.append(" lim="); buf.append(limit()); buf.append(" cap="); buf.append(capacity()); buf.append(": "); buf.append(getHexDump(16)); buf.append(']'); return buf.toString(); }
/** * {@inheritDoc} */ @Override public String toString() { StringBuilder buf = new StringBuilder(); if (isDirect()) { buf.append("DirectBuffer"); } else { buf.append("HeapBuffer"); } buf.append("[pos="); buf.append(position()); buf.append(" lim="); buf.append(limit()); buf.append(" cap="); buf.append(capacity()); buf.append(": "); buf.append(getHexDump(16)); buf.append(']'); return buf.toString(); }
ByteBuffer newBuf = getAllocator().allocateNioBuffer(newCapacity, isDirect()); oldBuf.position(0); oldBuf.limit(limit);
ByteBuffer newBuf = getAllocator().allocateNioBuffer(newCapacity, isDirect()); oldBuf.clear(); newBuf.put(oldBuf);
ByteBuffer newBuf = getAllocator().allocateNioBuffer(newCapacity, isDirect()); oldBuf.position(0); oldBuf.limit(limit);
.allocateNioBuffer(newCapacity, isDirect()); oldBuf.position(0); oldBuf.limit(limit);
ByteBuffer newBuf = getAllocator().allocateNioBuffer(newCapacity, isDirect()); oldBuf.clear(); newBuf.put(oldBuf);
isDirect()); oldBuf.clear(); newBuf.put(oldBuf);
ByteBuffer newBuf = getAllocator().allocateNioBuffer(newCapacity, isDirect()); newBuf.put(oldBuf); buf(newBuf);
ByteBuffer newBuf = getAllocator().allocateNioBuffer(newCapacity, isDirect()); newBuf.put(oldBuf); buf(newBuf);
isDirect()); newBuf.put(oldBuf); buf(newBuf);