Uploaded image for project: 'MINA'
  1. MINA
  2. DIRMINA-136

ByteBuffer.sweep()

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.9.0
    • None
    • None

    Description

      It is sometimes useful to provide a shortcut for this operation:

      buf.clear();
      buf.fillAndReset( buf.remaining() );

      I suggest to add ByteBuffer.sweep() and ByteBuffer.sweep( byte value ) so users can sweep the old content of the newly allocated buffer if they need to do:

      ByteBuffer buf = ByteBuffer.allocate( 16 ).sweep();

      Attachments

        Activity

          People

            niklas@trillian.se Niklas Therning
            trustin Trustin Lee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: