| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |