Home
last modified time | relevance | path

Searched refs:ByteString (Results 1 – 25 of 648) sorted by relevance

12345678910>>...26

/external/okhttp/okio/okio/src/test/java/okio/
DByteStringTest.java39 ByteString byteString = ByteString.of(bytes, 2, 9); in ofCopyRange()
46 ByteString byteString = ByteString.decodeHex("ab12"); in getByte()
52 ByteString byteString = ByteString.decodeHex("ab12"); in getByteOutOfBounds()
61 ByteString byteString = ByteString.decodeHex("000102"); in equals()
63 assertTrue(byteString.equals(ByteString.decodeHex("000102"))); in equals()
64 assertTrue(ByteString.of().equals(ByteString.EMPTY)); in equals()
65 assertTrue(ByteString.EMPTY.equals(ByteString.of())); in equals()
67 assertFalse(byteString.equals(ByteString.decodeHex("000201"))); in equals()
73 ByteString byteString = ByteString.encodeUtf8(bronzeHorseman); in utf8()
75 assertTrue(byteString.equals(ByteString.of(bronzeHorseman.getBytes(Util.UTF_8)))); in utf8()
[all …]
/external/pdfium/core/fxcrt/
Dbytestring.h29 class ByteString {
35 static ByteString FormatInteger(int i) WARN_UNUSED_RESULT;
36 static ByteString FormatFloat(float f) WARN_UNUSED_RESULT;
37 static ByteString Format(const char* lpszFormat, ...) WARN_UNUSED_RESULT;
38 static ByteString FormatV(const char* lpszFormat,
41 ByteString();
42 ByteString(const ByteString& other);
43 ByteString(ByteString&& other) noexcept;
47 ByteString(char ch);
49 ByteString(const char* ptr);
[all …]
Dbytestring.cpp25 template class fxcrt::StringPoolTemplate<ByteString>;
26 template struct std::hash<ByteString>;
71 ByteString GetByteString(uint16_t codepage, const WideStringView& wstr) { in GetByteString()
81 return ByteString(); in GetByteString()
83 ByteString bstr; in GetByteString()
95 static_assert(sizeof(ByteString) <= sizeof(char*),
103 ByteString ByteString::FormatInteger(int i) { in FormatInteger()
106 return ByteString(buf); in FormatInteger()
110 ByteString ByteString::FormatFloat(float d) { in FormatFloat()
112 return ByteString(buf, FX_ftoa(d, buf)); in FormatFloat()
[all …]
Dbytestring_unittest.cpp16 TEST(ByteString, ElementAccess) { in TEST() argument
17 const ByteString abc("abc"); in TEST()
25 ByteString mutable_abc = abc; in TEST()
53 TEST(ByteString, OperatorLT) { in TEST() argument
54 ByteString empty; in TEST()
55 ByteString a("a"); in TEST()
56 ByteString abc("abc"); in TEST()
57 ByteString def("def"); in TEST()
148 TEST(ByteString, OperatorEQ) { in TEST() argument
149 ByteString null_string; in TEST()
[all …]
/external/protobuf/java/core/src/test/java/com/google/protobuf/
DByteStringTest.java33 import com.google.protobuf.ByteString.Output;
93 ByteString substring = ByteString.copyFrom(bytes).substring(500); in testSubstring_BeginIndex()
100 ByteString byteString = ByteString.copyFrom(bytes, 500, 200); in testCopyFrom_BytesOffsetSize()
107 ByteString byteString = ByteString.copyFrom(bytes); in testCopyFrom_Bytes()
117 ByteString byteString = ByteString.copyFrom(byteBuffer, 200); in testCopyFrom_ByteBufferSize()
127 ByteString byteString = ByteString.copyFrom(byteBuffer); in testCopyFrom_ByteBuffer()
134 ByteString byteString = ByteString.copyFrom(testString, UTF_16); in testCopyFrom_StringEncoding()
142 ByteString byteString = ByteString.copyFromUtf8(testString); in testCopyFrom_Utf8()
150 final List<ByteString> pieces = makeConcretePieces(testBytes); in testCopyFrom_Iterable()
152 ByteString byteString = ByteString.copyFrom(pieces); in testCopyFrom_Iterable()
[all …]
DRopeByteStringTest.java57 Iterator<ByteString> iter = ByteStringTest.makeConcretePieces(referenceBytes).iterator(); in setUp()
77 ByteString concatenated = ByteString.EMPTY; in testBalance()
79 concatenated = concatenated.concat(ByteString.copyFrom(testBytes, i * pieceSize, pieceSize)); in testBalance()
86 ByteString testString = ByteString.copyFrom(testBytes); in testBalance()
98 ByteString sourceByteString = ByteString.copyFromUtf8(sourceString); in testToString()
103 ByteString unicode = ByteString.EMPTY; in testToString()
115 ByteString flatString = ByteString.copyFromUtf8(testString); in testToString()
124 ByteString sourceByteString = ByteString.copyFromUtf8(sourceString); in testCharsetToString()
129 ByteString unicode = ByteString.EMPTY; in testCharsetToString()
141 ByteString flatString = ByteString.copyFromUtf8(testString); in testCharsetToString()
[all …]
/external/okhttp/repackaged/okhttp/src/main/java/com/android/okhttp/internal/framed/
DHeader.java4 import com.android.okhttp.okio.ByteString;
10 public static final ByteString RESPONSE_STATUS = ByteString.encodeUtf8(":status");
11 public static final ByteString TARGET_METHOD = ByteString.encodeUtf8(":method");
12 public static final ByteString TARGET_PATH = ByteString.encodeUtf8(":path");
13 public static final ByteString TARGET_SCHEME = ByteString.encodeUtf8(":scheme");
14 public static final ByteString TARGET_AUTHORITY = ByteString.encodeUtf8(":authority"); // HTTP/2
15 public static final ByteString TARGET_HOST = ByteString.encodeUtf8(":host"); // spdy/3
16 public static final ByteString VERSION = ByteString.encodeUtf8(":version"); // spdy/3
19 public final ByteString name;
21 public final ByteString value;
[all …]
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/internal/framed/
DHeader.java3 import okio.ByteString;
8 public static final ByteString RESPONSE_STATUS = ByteString.encodeUtf8(":status");
9 public static final ByteString TARGET_METHOD = ByteString.encodeUtf8(":method");
10 public static final ByteString TARGET_PATH = ByteString.encodeUtf8(":path");
11 public static final ByteString TARGET_SCHEME = ByteString.encodeUtf8(":scheme");
12 public static final ByteString TARGET_AUTHORITY = ByteString.encodeUtf8(":authority"); // HTTP/2
13 public static final ByteString TARGET_HOST = ByteString.encodeUtf8(":host"); // spdy/3
14 public static final ByteString VERSION = ByteString.encodeUtf8(":version"); // spdy/3
17 public final ByteString name;
19 public final ByteString value;
[all …]
/external/grpc-grpc-java/okhttp/third_party/okhttp/main/java/io/grpc/okhttp/internal/framed/
DHeader.java7 import okio.ByteString;
12 public static final ByteString RESPONSE_STATUS = ByteString.encodeUtf8(":status");
13 public static final ByteString TARGET_METHOD = ByteString.encodeUtf8(":method");
14 public static final ByteString TARGET_PATH = ByteString.encodeUtf8(":path");
15 public static final ByteString TARGET_SCHEME = ByteString.encodeUtf8(":scheme");
16 public static final ByteString TARGET_AUTHORITY = ByteString.encodeUtf8(":authority"); // HTTP/2
17 public static final ByteString TARGET_HOST = ByteString.encodeUtf8(":host"); // spdy/3
18 public static final ByteString VERSION = ByteString.encodeUtf8(":version"); // spdy/3
21 public final ByteString name;
23 public final ByteString value;
[all …]
/external/pdfium/core/fpdfapi/parser/
Dcpdf_dictionary.h27 std::map<ByteString, std::unique_ptr<CPDF_Object>>::const_iterator;
43 CPDF_Object* GetObjectFor(const ByteString& key) const;
44 CPDF_Object* GetDirectObjectFor(const ByteString& key) const;
45 ByteString GetStringFor(const ByteString& key) const;
46 ByteString GetStringFor(const ByteString& key,
47 const ByteString& default_str) const;
48 WideString GetUnicodeTextFor(const ByteString& key) const;
49 int GetIntegerFor(const ByteString& key) const;
50 int GetIntegerFor(const ByteString& key, int default_int) const;
51 bool GetBooleanFor(const ByteString& key, bool bDefault = false) const;
[all …]
Dcpdf_dictionary.cpp82 CPDF_Object* CPDF_Dictionary::GetObjectFor(const ByteString& key) const { in GetObjectFor()
87 CPDF_Object* CPDF_Dictionary::GetDirectObjectFor(const ByteString& key) const { in GetDirectObjectFor()
92 ByteString CPDF_Dictionary::GetStringFor(const ByteString& key) const { in GetStringFor()
94 return p ? p->GetString() : ByteString(); in GetStringFor()
97 WideString CPDF_Dictionary::GetUnicodeTextFor(const ByteString& key) const { in GetUnicodeTextFor()
104 ByteString CPDF_Dictionary::GetStringFor(const ByteString& key, in GetStringFor()
105 const ByteString& def) const { in GetStringFor()
107 return p ? p->GetString() : ByteString(def); in GetStringFor()
110 int CPDF_Dictionary::GetIntegerFor(const ByteString& key) const { in GetIntegerFor()
115 int CPDF_Dictionary::GetIntegerFor(const ByteString& key, int def) const { in GetIntegerFor()
[all …]
Dcpdf_security_handler.h32 const ByteString& password);
35 const ByteString& user_password,
36 const ByteString& owner_password);
39 const ByteString& user_password);
44 ByteString GetUserPassword(const ByteString& owner_password,
46 bool CheckPassword(const ByteString& user_password,
61 bool CheckUserPassword(const ByteString& password,
66 bool CheckOwnerPassword(const ByteString& password,
69 bool AES256_CheckPassword(const ByteString& password,
73 const ByteString& password,
[all …]
/external/protobuf/csharp/src/Google.Protobuf.Test/
DByteStringTest.cs44 ByteString b1 = ByteString.CopyFrom(1, 2, 3); in Equality()
45 ByteString b2 = ByteString.CopyFrom(1, 2, 3); in Equality()
46 ByteString b3 = ByteString.CopyFrom(1, 2, 4); in Equality()
47 ByteString b4 = ByteString.CopyFrom(1, 2, 3, 4); in Equality()
59 Assert.IsTrue((ByteString) null == null); in Equality()
66 Assert.IsFalse((ByteString) null != null); in Equality()
72 Assert.AreEqual(0, ByteString.Empty.Length); in EmptyByteStringHasZeroSize()
78 ByteString bs = ByteString.CopyFrom("AB", Encoding.Unicode); in CopyFromStringWithExplicitEncoding()
89 Assert.IsTrue(ByteString.CopyFromUtf8("").IsEmpty); in IsEmptyWhenEmpty()
95 Assert.IsFalse(ByteString.CopyFromUtf8("X").IsEmpty); in IsEmptyWhenNotEmpty()
[all …]
/external/protobuf/csharp/src/Google.Protobuf/
DByteString.cs44 public sealed class ByteString : IEnumerable<byte>, IEquatable<ByteString> class
46 private static readonly ByteString empty = new ByteString(new byte[0]);
59 internal static ByteString FromBytes(byte[] bytes) in FromBytes()
61 return new ByteString(bytes); in FromBytes()
68 internal static byte[] GetBuffer(ByteString bytes) in GetBuffer()
77 internal static ByteString AttachBytes(byte[] bytes) in AttachBytes()
79 return new ByteString(bytes); in AttachBytes()
86 private ByteString(byte[] bytes) in ByteString() method in Google.Protobuf.ByteString
94 public static ByteString Empty
137 public static ByteString FromBase64(string bytes) in FromBase64()
[all …]
/external/okhttp/okhttp-ws-tests/src/test/java/com/squareup/okhttp/internal/ws/
DWebSocketReaderTest.java28 import okio.ByteString;
52 data.write(ByteString.decodeHex("0a00")); // Empty ping. in controlFramesMustBeFinal()
62 data.write(ByteString.decodeHex("9a00")); // Empty ping, flag 1 set. in reservedFlagsAreUnsupported()
70 data.write(ByteString.decodeHex("aa00")); // Empty ping, flag 2 set. in reservedFlagsAreUnsupported()
78 data.write(ByteString.decodeHex("ca00")); // Empty ping, flag 3 set. in reservedFlagsAreUnsupported()
88 data.write(ByteString.decodeHex("8100")); in clientSentFramesMustBeMasked()
98 data.write(ByteString.decodeHex("8180")); in serverSentFramesMustNotBeMasked()
108 data.write(ByteString.decodeHex("8a7e007e")); in controlFramePayloadMax()
118 data.write(ByteString.decodeHex("810548656c6c6f")); // Hello in clientSimpleHello()
124 data.write(ByteString.decodeHex("818537fa213d7f9f4d5158")); // Hello in serverSimpleHello()
[all …]
/external/okhttp/repackaged/okio/okio/src/main/java/com/android/okhttp/okio/
DByteString.java48 public class ByteString implements Serializable, Comparable<ByteString> { class
54 public static final ByteString EMPTY = ByteString.of();
60 ByteString(byte[] data) { in ByteString() method in ByteString
67 public static ByteString of(byte... data) { in of()
69 return new ByteString(data.clone()); in of()
76 public static ByteString of(byte[] data, int offset, int byteCount) { in of()
82 return new ByteString(copy); in of()
86 public static ByteString encodeUtf8(String s) { in encodeUtf8()
88 ByteString byteString = new ByteString(s.getBytes(Util.UTF_8)); in encodeUtf8()
110 public ByteString md5() { in md5()
[all …]
/external/okhttp/okio/okio/src/main/java/okio/
DByteString.java46 public class ByteString implements Serializable, Comparable<ByteString> { class
52 public static final ByteString EMPTY = ByteString.of();
58 ByteString(byte[] data) { in ByteString() method in ByteString
65 public static ByteString of(byte... data) { in of()
67 return new ByteString(data.clone()); in of()
74 public static ByteString of(byte[] data, int offset, int byteCount) { in of()
80 return new ByteString(copy); in of()
84 public static ByteString encodeUtf8(String s) { in encodeUtf8()
86 ByteString byteString = new ByteString(s.getBytes(Util.UTF_8)); in encodeUtf8()
108 public ByteString md5() { in md5()
[all …]
/external/pdfium/fpdfsdk/pwl/
Dcpwl_font_map.h23 ByteString sFontName;
28 ByteString sFontName;
38 ByteString GetPDFFontAlias(int32_t nFontIndex) override;
47 ByteString GetNativeFontName(int32_t nCharset);
49 static ByteString GetDefaultFontByCharset(int32_t nCharset);
55 virtual CPDF_Font* FindFontSameCharset(ByteString* sFontAlias,
57 virtual void AddedFont(CPDF_Font* pFont, const ByteString& sFontAlias);
62 int32_t GetFontIndex(const ByteString& sFontName,
66 const ByteString& sFontAlias,
69 ByteString EncodeFontAlias(const ByteString& sFontName, int32_t nCharset);
[all …]
Dcpwl_font_map.cpp69 ByteString CPWL_FontMap::GetPDFFontAlias(int32_t nFontIndex) { in GetPDFFontAlias()
73 return ByteString(); in GetPDFFontAlias()
125 ByteString CPWL_FontMap::GetNativeFontName(int32_t nCharset) { in GetNativeFontName()
131 ByteString sNew = GetNativeFont(nCharset); in GetNativeFontName()
133 return ByteString(); in GetNativeFontName()
151 bool CPWL_FontMap::IsStandardFont(const ByteString& sFontName) { in IsStandardFont()
160 int32_t CPWL_FontMap::FindFont(const ByteString& sFontName, int32_t nCharset) { in FindFont()
173 int32_t CPWL_FontMap::GetFontIndex(const ByteString& sFontName, in GetFontIndex()
180 ByteString sAlias; in GetFontIndex()
183 ByteString sTemp = sFontName; in GetFontIndex()
[all …]
/external/protobuf/java/core/src/main/java/com/google/protobuf/
DByteString.java68 public abstract class ByteString implements Iterable<Byte>, Serializable { class
89 public static final ByteString EMPTY = new LiteralByteString(Internal.EMPTY_BYTE_ARRAY);
147 ByteString() {} in ByteString() method in ByteString
244 public final ByteString substring(int beginIndex) { in substring()
258 public abstract ByteString substring(int beginIndex, int endIndex); in substring()
269 public final boolean startsWith(ByteString prefix) { in startsWith()
283 public final boolean endsWith(ByteString suffix) { in endsWith()
299 public static ByteString copyFrom(byte[] bytes, int offset, int size) { in copyFrom()
309 public static ByteString copyFrom(byte[] bytes) { in copyFrom()
317 static ByteString wrap(byte[] bytes) { in wrap()
[all …]
DRopeByteString.java73 final class RopeByteString extends ByteString {
118 private final ByteString left;
119 private final ByteString right;
132 private RopeByteString(ByteString left, ByteString right) { in RopeByteString()
155 static ByteString concatenate(ByteString left, ByteString right) { in concatenate()
165 if (newLength < ByteString.CONCATENATE_BY_COPY_SIZE) { in concatenate()
184 ByteString newRight = concatenateBytes(leftRope.right, right); in concatenate()
195 ByteString newRight = new RopeByteString(leftRope.right, right); in concatenate()
218 private static ByteString concatenateBytes(ByteString left, in concatenateBytes()
219 ByteString right) { in concatenateBytes()
[all …]
DLazyStringArrayList.java118 } else if (o instanceof ByteString) { in get()
119 ByteString bs = (ByteString) o; in get()
154 private void add(int index, ByteString element) { in add()
188 public boolean addAllByteString(Collection<? extends ByteString> values) { in addAllByteString()
219 public void add(ByteString element) { in add()
238 public ByteString getByteString(int index) { in getByteString()
240 ByteString b = asByteString(o); in getByteString()
258 public void set(int index, ByteString s) { in set()
262 private Object setAndReturn(int index, ByteString s) { in setAndReturn()
280 } else if (o instanceof ByteString) { in asString()
[all …]
/external/pdfium/core/fxge/
Dcfx_folderfontinfo.h23 void AddPath(const ByteString& path);
44 bool GetFaceName(void* hFont, ByteString* name) override;
50 FontFaceInfo(ByteString filePath,
51 ByteString faceName,
52 ByteString fontTables,
56 const ByteString m_FilePath;
57 const ByteString m_FaceName;
58 const ByteString m_FontTables;
65 void ScanPath(const ByteString& path);
66 void ScanFile(const ByteString& path);
[all …]
/external/pdfium/core/fpdfdoc/
Dcpdf_formcontrol.cpp37 ByteString CPDF_FormControl::GetOnStateName() const { in GetOnStateName()
40 ByteString csOn; in GetOnStateName()
53 return ByteString(); in GetOnStateName()
56 void CPDF_FormControl::SetOnStateName(const ByteString& csOn) { in SetOnStateName()
59 ByteString csValue = csOn; in SetOnStateName()
65 ByteString csAS = m_pWidgetDict->GetStringFor("AS", "Off"); in SetOnStateName()
85 const ByteString& csKey2 = subdict_it->first; in SetOnStateName()
98 ByteString CPDF_FormControl::GetCheckedAPState() { in GetCheckedAPState()
101 ByteString csOn = GetOnStateName(); in GetCheckedAPState()
105 csOn = ByteString::Format("%d", m_pField->GetControlIndex(this)); in GetCheckedAPState()
[all …]
/external/pdfium/fxbarcode/
DBC_UtilCodingConvert.cpp14 ByteString& dst) { in UnicodeToLocale()
15 dst = ByteString::FromUnicode(src); in UnicodeToLocale()
18 void CBC_UtilCodingConvert::LocaleToUtf8(const ByteString& src, in LocaleToUtf8()
19 ByteString& dst) { in LocaleToUtf8()
24 void CBC_UtilCodingConvert::LocaleToUtf8(const ByteString& src, in LocaleToUtf8()
27 ByteString utf8 = unicode.UTF8Encode(); in LocaleToUtf8()
32 ByteString& dst) { in Utf8ToLocale()
33 ByteString utf8; in Utf8ToLocale()
38 dst = ByteString::FromUnicode(unicode); in Utf8ToLocale()
43 ByteString& dst) { in Utf8ToLocale()
[all …]

12345678910>>...26