Issue Details (XML | Word | Printable)

Key: DIRMINA-136
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Niklas Therning
Reporter: Trustin Lee
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
MINA

ByteBuffer.sweep()

Created: 03/Dec/05 10:08 AM   Updated: 04/Dec/05 08:22 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: 0.9.0

Time Tracking:
Not Specified

Resolution Date: 04/Dec/05 03:33 AM


 Description  « Hide
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();

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.