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

Unified Diff: pkg/mime/lib/src/mime_multipart_transformer.dart

Issue 272353002: pkg/mime: layout as mini-libraries (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: cl nits, other fixes Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: pkg/mime/lib/src/mime_multipart_transformer.dart
diff --git a/pkg/mime/lib/src/mime_multipart_transformer.dart b/pkg/mime/lib/src/mime_multipart_transformer.dart
index a35b491365372a53a99d1e115f39bd5648a9ab72..75d10ff711fd049aa740d1ad8723d304c3d75131 100644
--- a/pkg/mime/lib/src/mime_multipart_transformer.dart
+++ b/pkg/mime/lib/src/mime_multipart_transformer.dart
@@ -2,8 +2,11 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-part of mime;
+library mime.multipart_transformer;
+import 'dart:async';
+import 'dart:convert';
+import 'dart:typed_data';
/**
* A Mime Multipart class representing each part parsed by
@@ -30,12 +33,6 @@ class _MimeMultipart extends MimeMultipart {
}
}
-class _Const {
- // Bytes for '()<>@,;:\\"/[]?={} \t'.
- static const SEPARATORS = const [40, 41, 60, 62, 64, 44, 59, 58, 92, 34, 47,
- 91, 93, 63, 61, 123, 125, 32, 9];
-}
-
class _CharCode {
static const int HT = 9;
static const int LF = 10;
@@ -71,6 +68,10 @@ class MimeMultipartTransformer
static const int _DONE = 14;
static const int _FAILURE = 15;
+ // Bytes for '()<>@,;:\\"/[]?={} \t'.
+ static const _SEPARATORS = const [40, 41, 60, 62, 64, 44, 59, 58, 92, 34, 47,
+ 91, 93, 63, 61, 123, 125, 32, 9];
+
StreamController _controller;
StreamSubscription _subscription;
@@ -387,7 +388,7 @@ class MimeMultipartTransformer
}
bool _isTokenChar(int byte) {
- return byte > 31 && byte < 128 && _Const.SEPARATORS.indexOf(byte) == -1;
+ return byte > 31 && byte < 128 && _SEPARATORS.indexOf(byte) == -1;
}
int _toLowerCase(int byte) {
@@ -412,7 +413,9 @@ class MimeMultipartTransformer
class MimeMultipartException implements Exception {
+ final String message;
+
const MimeMultipartException([String this.message = ""]);
+
String toString() => "MimeMultipartException: $message";
- final String message;
}

Powered by Google App Engine
This is Rietveld 408576698