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

Unified Diff: runtime/bin/file_impl.dart

Issue 8493002: Change the default for the len argument to writeFrom on OutputStream (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments from ager@ Created 9 years, 1 month 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
« no previous file with comments | « no previous file | runtime/bin/output_stream.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file_impl.dart
diff --git a/runtime/bin/file_impl.dart b/runtime/bin/file_impl.dart
index 6dbd6f921b708394ccb73c919d8c5f35ce8fc6b3..8225de2862dc7018c3bfd38d8e6e9036e4d7eb30 100644
--- a/runtime/bin/file_impl.dart
+++ b/runtime/bin/file_impl.dart
@@ -73,12 +73,13 @@ class _FileOutputStream implements FileOutputStream {
_file.openSync(true);
}
- bool write(List<int> buffer) {
+ bool write(List<int> buffer, [bool copyBuffer = false]) {
return _write(buffer, 0, buffer.length);
}
bool writeFrom(List<int> buffer, [int offset, int len]) {
- return _write(buffer, offset, (len == null) ? buffer.length : len);
+ return _write(
+ buffer, offset, (len == null) ? buffer.length - offset : len);
}
void end() {
« no previous file with comments | « no previous file | runtime/bin/output_stream.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698