Bug 3481 - ByteBuffer slice(offset, len) does not work/not implemented
Summary: ByteBuffer slice(offset, len) does not work/not implemented
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Andrew Cagney
URL:
Keywords:
Depends on:
Blocks: 2231 2243
  Show dependency treegraph
 
Reported: 2006-11-07 19:41 UTC by Phil Muldoon
Modified: 2007-04-18 16:15 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Muldoon 2006-11-07 19:41:38 UTC
slice(offset, len) calls subbuffer which is not implemented

 /**
   * Given BUFFER, return a new subBuffer. Used by {@link #slice}.
   */
  protected ByteBuffer subBuffer (ByteBuffer buffer, long lowerExtreem,
                                  long upperExtreem)
  { 
    throw new RuntimeException("not implemented");
  } 
  
  public ByteBuffer slice (long off, long len)
  {
    ByteBuffer newSlice = subBuffer(this, lowWater + off, lowWater + off + len);
    newSlice.order(order());
    newSlice.wordSize(wordSize());
    return newSlice;
  }
Comment 1 Andrew Cagney 2007-04-18 17:15:51 UTC
2007-04-15  Andrew Cagney  <cagney@redhat.com>

        * TestByteBuffer.java: New file.
        * RegisterSetByteBuffer.java (subBuffer): Add.
        * AddressSpaceByteBuffer.java (subBuffer): Ditto.