Parent Directory | Revision Log | Patch
revision 1.7 by robilad, Wed Jun 16 08:57:10 2004 UTC | revision 1.7.2.1 by gnu_andrew, Sun Jan 16 15:15:12 2005 UTC | |
---|---|---|
# | Line 112 final class ByteBufferImpl extends ByteB | Line 112 final class ByteBufferImpl extends ByteB |
112 | ||
113 | public ByteBuffer compact () | public ByteBuffer compact () |
114 | { | { |
115 | checkIfReadOnly(); | |
116 | mark = -1; | |
117 | int pos = position(); | int pos = position(); |
118 | if (pos > 0) | if (pos > 0) |
119 | { | { |
# | Line 120 final class ByteBufferImpl extends ByteB | Line 122 final class ByteBufferImpl extends ByteB |
122 | position(count); | position(count); |
123 | limit(capacity()); | limit(capacity()); |
124 | } | } |
125 | else | |
126 | { | |
127 | position(limit()); | |
128 | limit(capacity()); | |
129 | } | |
130 | return this; | return this; |
131 | } | } |
132 |
|
savannah-hackers-public@gnu.org | ViewVC Help |
Powered by ViewVC 1.1.26 |