| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 * Utility class that can fast concatenate [List<int>]s of bytes. Use | 8 * Utility class that can fast concatenate [List<int>]s of bytes. Use |
| 9 * [readBytes] to get the final buffer. | 9 * [readBytes] to get the final buffer. |
| 10 */ | 10 */ |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 * Returns the total number of bytes in the buffer. | 76 * Returns the total number of bytes in the buffer. |
| 77 */ | 77 */ |
| 78 int get length => _length; | 78 int get length => _length; |
| 79 | 79 |
| 80 /** | 80 /** |
| 81 * Returns whether the buffer list is empty. | 81 * Returns whether the buffer list is empty. |
| 82 */ | 82 */ |
| 83 bool get isEmpty => _length == 0; | 83 bool get isEmpty => _length == 0; |
| 84 | 84 |
| 85 /** | 85 /** |
| 86 * Returns whether the buffer list is not empty. |
| 87 */ |
| 88 bool get isNotEmpty => !isEmpty; |
| 89 |
| 90 /** |
| 86 * Clears the content of the buffer list. | 91 * Clears the content of the buffer list. |
| 87 */ | 92 */ |
| 88 void clear() { | 93 void clear() { |
| 89 _length = 0; | 94 _length = 0; |
| 90 _buffer = null; | 95 _buffer = null; |
| 91 } | 96 } |
| 92 | 97 |
| 93 int _length; // Total number of bytes in the buffer. | 98 int _length; // Total number of bytes in the buffer. |
| 94 Uint8List _buffer; // Internal buffer. | 99 Uint8List _buffer; // Internal buffer. |
| 95 } | 100 } |
| OLD | NEW |