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

Side by Side Diff: pkg/http_parser/lib/src/bytes_builder.dart

Issue 250073002: Re-apply "Add a non-dart:io WebSocket implementation to http_parser." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months 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 | « pkg/http_parser/lib/http_parser.dart ('k') | pkg/http_parser/lib/src/web_socket.dart » ('j') | 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 // This is a copy of "dart:io"'s BytesBuilder implementation, from
6 // sdk/lib/io/bytes_builder.dart. It's copied here to make it available to
7 // non-"dart:io" applications (issue 18348).
8 //
9 // Because it's copied directly, there are no modifications from the original.
10 library http_parser.bytes_builder;
11
12 import 'dart:math';
13 import 'dart:typed_data';
6 14
7 /** 15 /**
8 * Builds a list of bytes, allowing bytes and lists of bytes to be added at the 16 * Builds a list of bytes, allowing bytes and lists of bytes to be added at the
9 * end. 17 * end.
10 * 18 *
11 * Used to efficiently collect bytes and lists of bytes. 19 * Used to efficiently collect bytes and lists of bytes.
12 */ 20 */
13 abstract class BytesBuilder { 21 abstract class BytesBuilder {
14 /** 22 /**
15 * Construct a new empty [BytesBuilder]. 23 * Construct a new empty [BytesBuilder].
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 205
198 bool get isEmpty => _length == 0; 206 bool get isEmpty => _length == 0;
199 207
200 bool get isNotEmpty => _length != 0; 208 bool get isNotEmpty => _length != 0;
201 209
202 void clear() { 210 void clear() {
203 _length = 0; 211 _length = 0;
204 _chunks.clear(); 212 _chunks.clear();
205 } 213 }
206 } 214 }
OLDNEW
« no previous file with comments | « pkg/http_parser/lib/http_parser.dart ('k') | pkg/http_parser/lib/src/web_socket.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698