Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(380)

Side by Side Diff: sdk/lib/io/bytes_builder.dart

Issue 102733005: Fix ByteBuffer documentation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.io; 5 part of dart.io;
6 6
7 /** 7 /**
8 * Builds a list of bytes, allowing bytes and lists of bytes to be added at the 8 * Builds a list of bytes, allowing bytes and lists of bytes to be added at the
9 * end. 9 * end.
10 * 10 *
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 * The number of bytes in the builder. 91 * The number of bytes in the builder.
92 */ 92 */
93 int get length => _length; 93 int get length => _length;
94 94
95 /** 95 /**
96 * Returns `true` if the buffer is empty. 96 * Returns `true` if the buffer is empty.
97 */ 97 */
98 bool get isEmpty => _length == 0; 98 bool get isEmpty => _length == 0;
99 99
100 /** 100 /**
101 * Returns `true` if the buffer is empty. 101 * Returns `true` if the buffer is not empty.
102 */ 102 */
103 bool get isNotEmpty => _length != 0; 103 bool get isNotEmpty => _length != 0;
104 104
105 /** 105 /**
106 * Clear the contents of the builder. 106 * Clear the contents of the builder.
107 */ 107 */
108 void clear() { 108 void clear() {
109 _length = 0; 109 _length = 0;
110 _buffer = null; 110 _buffer = null;
111 } 111 }
112 112
113 int _pow2roundup(int x) { 113 int _pow2roundup(int x) {
114 --x; 114 --x;
115 x |= x >> 1; 115 x |= x >> 1;
116 x |= x >> 2; 116 x |= x >> 2;
117 x |= x >> 4; 117 x |= x >> 4;
118 x |= x >> 8; 118 x |= x >> 8;
119 x |= x >> 16; 119 x |= x >> 16;
120 return x + 1; 120 return x + 1;
121 } 121 }
122 } 122 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698