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

Side by Side Diff: third_party/protobuf/java/core/src/main/java/com/google/protobuf/RopeByteString.java

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Make chrome settings proto generated file a component Created 4 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
OLDNEW
1 // Protocol Buffers - Google's data interchange format 1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved. 2 // Copyright 2008 Google Inc. All rights reserved.
3 // https://developers.google.com/protocol-buffers/ 3 // https://developers.google.com/protocol-buffers/
4 // 4 //
5 // Redistribution and use in source and binary forms, with or without 5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are 6 // modification, are permitted provided that the following conditions are
7 // met: 7 // met:
8 // 8 //
9 // * Redistributions of source code must retain the above copyright 9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer. 10 // notice, this list of conditions and the following disclaimer.
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 right.writeToInternal(out, 0, numberToWrite - numberToWriteInLeft); 399 right.writeToInternal(out, 0, numberToWrite - numberToWriteInLeft);
400 } 400 }
401 } 401 }
402 402
403 @Override 403 @Override
404 void writeTo(ByteOutput output) throws IOException { 404 void writeTo(ByteOutput output) throws IOException {
405 left.writeTo(output); 405 left.writeTo(output);
406 right.writeTo(output); 406 right.writeTo(output);
407 } 407 }
408 408
409
409 @Override 410 @Override
410 protected String toStringInternal(Charset charset) { 411 protected String toStringInternal(Charset charset) {
411 return new String(toByteArray(), charset); 412 return new String(toByteArray(), charset);
412 } 413 }
413 414
414 // ================================================================= 415 // =================================================================
415 // UTF-8 decoding 416 // UTF-8 decoding
416 417
417 @Override 418 @Override
418 public boolean isValidUtf8() { 419 public boolean isValidUtf8() {
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 currentPiece = pieceIterator.next(); 888 currentPiece = pieceIterator.next();
888 currentPieceSize = currentPiece.size(); 889 currentPieceSize = currentPiece.size();
889 } else { 890 } else {
890 currentPiece = null; 891 currentPiece = null;
891 currentPieceSize = 0; 892 currentPieceSize = 0;
892 } 893 }
893 } 894 }
894 } 895 }
895 } 896 }
896 } 897 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698