@ SuppressWarnings ( "unchecked" ) public final T duplicate ( ) { if ( backing instanceof ByteBuffer ) { return ( T ) ( ( ByteBuffer ) backing ) . duplicate ( ) ; } if ( backing instanceof CharBuffer ) { return ( T ) ( ( CharBuffer ) backing ) . duplicate ( ) ; } throw new IllegalArgumentException ( "Backing buffer of unknown type." ) ; }
Duplicate the buffer .