jdk/src/java.base/share/classes/java/nio/Heap-X-Buffer.java.template
changeset 31873 87b015c2cd36
parent 30338 957ee8b5a33a
child 33662 747a61ad0977
child 33656 ef901bc43f7a
equal deleted inserted replaced
31872:eb13a70c73a5 31873:87b015c2cd36
   214 
   214 
   215     public $Type$Buffer put($Type$Buffer src) {
   215     public $Type$Buffer put($Type$Buffer src) {
   216 #if[rw]
   216 #if[rw]
   217         if (src instanceof Heap$Type$Buffer) {
   217         if (src instanceof Heap$Type$Buffer) {
   218             if (src == this)
   218             if (src == this)
   219                 throw new IllegalArgumentException();
   219                 throw createSameBufferException();
   220             Heap$Type$Buffer sb = (Heap$Type$Buffer)src;
   220             Heap$Type$Buffer sb = (Heap$Type$Buffer)src;
   221             int n = sb.remaining();
   221             int n = sb.remaining();
   222             if (n > remaining())
   222             if (n > remaining())
   223                 throw new BufferOverflowException();
   223                 throw new BufferOverflowException();
   224             System.arraycopy(sb.hb, sb.ix(sb.position()),
   224             System.arraycopy(sb.hb, sb.ix(sb.position()),