HomeSort by relevance Sort by last modified time
    Searched refs:ByteString (Results 1 - 25 of 74) sorted by null

1 2 3

  /external/chromium_org/third_party/protobuf/java/src/main/java/com/google/protobuf/
LazyStringList.java 37 * items of the list as UTF8-encoded ByteString objects. This is used by the
41 * ByteString is already cached.
46 * attempting to support the functionality of say {@code List<ByteString>}, hence
54 * Returns the element at the specified position in this list as a ByteString.
61 ByteString getByteString(int index);
71 void add(ByteString element);
76 * {@code ByteString}. It is an error for the caller to modify the returned
ByteString.java 51 * Like {@link String}, the contents of a {@link ByteString} can never be
60 public abstract class ByteString implements Iterable<Byte> {
64 * this, we just copy their bytes on {@link #concat(ByteString)}.
71 * When copying an InputStream into a ByteString with .readFrom(),
79 * Empty {@code ByteString}.
81 public static final ByteString EMPTY = new LiteralByteString(new byte[0]);
84 ByteString() {}
99 * Return a {@link ByteString.ByteIterator} over the bytes in the ByteString.
139 // ByteString -> substrin
    [all...]
Internal.java 91 public static ByteString bytesDefaultValue(String bytes) {
93 return ByteString.copyFrom(bytes.getBytes("ISO-8859-1"));
108 * Arrays.equals(byteString.toByteArray(),
109 * new String(byteString.toByteArray(), "UTF-8").getBytes("UTF-8"))
125 * ByteString#isValidUtf8()}. Calling that method directly is preferred.
127 * @param byteString the string to check
130 public static boolean isValidUtf8(ByteString byteString) {
131 return byteString.isValidUtf8();
LazyStringArrayList.java 42 * element is either a ByteString or a String. It caches the last one requested
91 ByteString bs = (ByteString) o;
150 public void add(ByteString element) {
156 public ByteString getByteString(int index) {
159 ByteString b = ByteString.copyFromUtf8((String) o);
163 return (ByteString) o;
171 return ((ByteString) o).toStringUtf8();
RopeByteString.java 70 class RopeByteString extends ByteString {
115 private final ByteString left;
116 private final ByteString right;
129 private RopeByteString(ByteString left, ByteString right) {
144 * ByteString#CONCATENATE_BY_COPY_SIZE} may be copied by value here, as in
151 static ByteString concatenate(ByteString left, ByteString right) {
152 ByteString result
    [all...]
Parser.java 86 public MessageType parseFrom(ByteString data)
94 public MessageType parseFrom(ByteString data,
99 * Like {@link #parseFrom(ByteString)}, but does not throw an
103 public MessageType parsePartialFrom(ByteString data)
107 * Like {@link #parseFrom(ByteString, ExtensionRegistryLite)},
111 public MessageType parsePartialFrom(ByteString data,
156 * Like {@link #parseFrom(ByteString, ExtensionRegistryLite)},
MessageLite.java 92 * Serializes the message to a {@code ByteString} and returns it. This is
96 ByteString toByteString();
217 Builder mergeFrom(ByteString data) throws InvalidProtocolBufferException;
226 Builder mergeFrom(ByteString data,
LiteralByteString.java 44 * This class implements a {@link com.google.protobuf.ByteString} backed by a
52 class LiteralByteString extends ByteString {
80 // ByteString -> substring
83 public ByteString substring(int beginIndex, int endIndex) {
99 ByteString result;
101 result = ByteString.EMPTY;
110 // ByteString -> byte[]
174 if (!(other instanceof ByteString)) {
178 if (size() != ((ByteString) other).size()) {
191 "Has a new type of ByteString been created? Found
    [all...]
UnmodifiableLazyStringList.java 65 public ByteString getByteString(int index) {
70 public void add(ByteString element) {
LazyField.java 39 * the message in a ByteString initially and then parse it on-demand.
55 private ByteString bytes;
60 ExtensionRegistryLite extensionRegistry, ByteString bytes) {
95 public ByteString toByteString() {
Message.java 214 Builder mergeFrom(ByteString data) throws InvalidProtocolBufferException;
215 Builder mergeFrom(ByteString data,
  /external/chromium_org/third_party/protobuf/java/src/test/java/com/google/protobuf/
ByteStringTest.java 33 import com.google.protobuf.ByteString.Output;
51 * Test methods with implementations in {@link ByteString}, plus do some top-level "integration"
91 ByteString substring = ByteString.copyFrom(bytes).substring(500);
98 ByteString byteString = ByteString.copyFrom(bytes, 500, 200);
100 isArrayRange(byteString.toByteArray(), bytes, 500, 200));
105 ByteString byteString = ByteString.copyFrom(bytes)
    [all...]
IsValidUtf8Test.java 40 * Tests cases for {@link ByteString#isValidUtf8()}. This includes three
135 private ByteString toByteString(int... bytes) {
136 return ByteString.copyFrom(toByteArray(bytes));
143 ByteString lit = ByteString.copyFrom(realBytes);
144 ByteString sub = lit.substring(0, bytes.length);
147 ByteString[] ropes = {
148 RopeByteString.newInstanceForTest(ByteString.EMPTY, lit),
149 RopeByteString.newInstanceForTest(ByteString.EMPTY, sub),
150 RopeByteString.newInstanceForTest(lit, ByteString.EMPTY)
    [all...]
RopeByteStringTest.java 52 Iterator<ByteString> iter = ByteStringTest.makeConcretePieces(referenceBytes).iterator();
71 // Build up a big ByteString from smaller pieces to force a rebalance
72 ByteString concatenated = ByteString.EMPTY;
74 concatenated = concatenated.concat(ByteString.copyFrom(testBytes, i * pieceSize, pieceSize));
81 ByteString testString = ByteString.copyFrom(testBytes);
93 ByteString sourceByteString = ByteString.copyFromUtf8(sourceString);
98 ByteString unicode = ByteString.EMPTY
    [all...]
RopeByteStringSubstringTest.java 48 Iterator<ByteString> iter = ByteStringTest.makeConcretePieces(sourceBytes).iterator();
49 ByteString sourceString = iter.next();
71 ByteString sourceByteString = ByteString.copyFromUtf8(sourceString);
76 ByteString unicode = ByteString.EMPTY;
92 ByteString flatString = ByteString.copyFromUtf8(testString);
LazyStringEndToEndTest.java 48 private static ByteString TEST_ALL_TYPES_SERIALIZED_WITH_ILLEGAL_UTF8 =
49 ByteString.copyFrom(new byte[] {
53 private ByteString encodedTestAllTypes;
73 ByteString bytes = tV2.toByteString();
90 ByteString.copyFrom(sink));
109 // There's no way to directly observe that the ByteString is cached
132 ByteString optional = proto.getOptionalStringBytes();
136 ByteString repeated0 = proto.getRepeatedStringBytes(0);
137 ByteString repeated1 = proto.getRepeatedStringBytes(1);
UnmodifiableLazyStringListTest.java 49 private static ByteString BYTE_STRING_A = ByteString.copyFromUtf8("A");
50 private static ByteString BYTE_STRING_B = ByteString.copyFromUtf8("B");
51 private static ByteString BYTE_STRING_C = ByteString.copyFromUtf8("C");
BoundedByteStringTest.java 50 stringUnderTest = ByteString.copyFrom(sourceBytes).substring(from, to);
60 ByteString chopped = unicode.substring(2, unicode.size() - 6);
LazyStringArrayListTest.java 49 private static ByteString BYTE_STRING_A = ByteString.copyFromUtf8("A");
50 private static ByteString BYTE_STRING_B = ByteString.copyFromUtf8("B");
51 private static ByteString BYTE_STRING_C = ByteString.copyFromUtf8("C");
98 // from the ByteString
110 // ByteString needs to be computed from string for both a and b
111 ByteString aPrimeByteString = list.getByteString(0);
113 ByteString bPrimeByteString = list.getByteString(1)
    [all...]
WireFormatTest.java 61 ByteString rawBytes = message.toByteString();
72 ByteString rawBytes = message.toByteString();
86 ByteString rawBytes = message.toByteString();
98 ByteString rawBytes = message.toByteString();
101 ByteString rawBytes2 = message2.toByteString();
134 ByteString rawBytes = message.toByteString();
146 ByteString rawBytes = message.toByteString();
149 ByteString rawBytes2 = message2.toByteString();
160 ByteString rawBytes = message.toByteString();
173 ByteString rawBytes = message.toByteString()
    [all...]
  /external/protobuf/java/src/main/java/com/google/protobuf/
ByteString.java 47 public final class ByteString {
50 private ByteString(final byte[] bytes) {
78 // byte[] -> ByteString
81 * Empty ByteString.
83 public static final ByteString EMPTY = new ByteString(new byte[0]);
86 * Copies the given bytes into a {@code ByteString}.
88 public static ByteString copyFrom(final byte[] bytes, final int offset,
92 return new ByteString(copy);
96 * Copies the given bytes into a {@code ByteString}
    [all...]
Internal.java 91 public static ByteString bytesDefaultValue(String bytes) {
93 return ByteString.copyFrom(bytes.getBytes("ISO-8859-1"));
MessageLite.java 100 * Serializes the message to a {@code ByteString} and returns it. This is
104 ByteString toByteString();
247 Builder mergeFrom(ByteString data) throws InvalidProtocolBufferException;
254 Builder mergeFrom(ByteString data,
  /external/protobuf/java/src/test/java/com/google/protobuf/
WireFormatTest.java 60 ByteString rawBytes = message.toByteString();
71 ByteString rawBytes = message.toByteString();
85 ByteString rawBytes = message.toByteString();
97 ByteString rawBytes = message.toByteString();
100 ByteString rawBytes2 = message2.toByteString();
133 ByteString rawBytes = message.toByteString();
145 ByteString rawBytes = message.toByteString();
148 ByteString rawBytes2 = message2.toByteString();
159 ByteString rawBytes = message.toByteString();
172 ByteString rawBytes = message.toByteString()
    [all...]
  /external/chromium_org/crypto/
openpgp_symmetric_encryption.cc 616 // ByteString is used throughout in order to avoid signedness issues with a
618 typedef std::basic_string<uint8> ByteString;
620 static ByteString Encrypt(base::StringPiece plaintext,
622 ByteString key;
623 ByteString ske = SerializeSymmetricKeyEncrypted(passphrase, &key);
625 ByteString literal_data = SerializeLiteralData(plaintext);
626 ByteString se = SerializeSymmetricallyEncrypted(literal_data, key);
633 static ByteString MakePacket(unsigned tag, const ByteString& contents) {
634 ByteString header
    [all...]

Completed in 334 milliseconds

1 2 3