~ubuntu-branches/ubuntu/trusty/protobuf/trusty-proposed

« back to all changes in this revision

Viewing changes to java/src/main/java/com/google/protobuf/ByteString.java

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2011-05-31 14:41:47 UTC
  • mfrom: (2.2.8 sid)
  • Revision ID: james.westby@ubuntu.com-20110531144147-s41g5fozgvyo462l
Tags: 2.4.0a-2ubuntu1
* Merge with Debian; remaining changes:
  - Fix linking with -lpthread.

Show diffs side-by-side

added added

removed removed

Lines of Context:
194
194
  }
195
195
 
196
196
  /**
 
197
   * Copies bytes into a ByteBuffer.
 
198
   *
 
199
   * @param target ByteBuffer to copy into.
 
200
   * @throws ReadOnlyBufferException if the {@code target} is read-only
 
201
   * @throws BufferOverflowException if the {@code target}'s remaining()
 
202
   *         space is not large enough to hold the data.
 
203
   */
 
204
  public void copyTo(ByteBuffer target) {
 
205
    target.put(bytes, 0, bytes.length);
 
206
  }
 
207
 
 
208
  /**
197
209
   * Copies bytes to a {@code byte[]}.
198
210
   */
199
211
  public byte[] toByteArray() {