Home
last modified time | relevance | path

Searched refs:bytes (Results 1 – 21 of 21) sorted by relevance

/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/utils/
DLittleEndianUtils.java46 public static long readUnsigned4Le(@Nonnull ByteBuffer bytes) throws IOException { in readUnsigned4Le() argument
47 Preconditions.checkNotNull(bytes, "bytes == null"); in readUnsigned4Le()
49 if (bytes.remaining() < 4) { in readUnsigned4Le()
50 throw new EOFException("Not enough data: 4 bytes expected, " + bytes.remaining() in readUnsigned4Le()
54 byte b0 = bytes.get(); in readUnsigned4Le()
55 byte b1 = bytes.get(); in readUnsigned4Le()
56 byte b2 = bytes.get(); in readUnsigned4Le()
57 byte b3 = bytes.get(); in readUnsigned4Le()
72 public static int readUnsigned2Le(@Nonnull ByteBuffer bytes) throws IOException { in readUnsigned2Le() argument
73 Preconditions.checkNotNull(bytes, "bytes == null"); in readUnsigned2Le()
[all …]
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/
DZipField.java146 void skip(@Nonnull ByteBuffer bytes) throws IOException { in skip() argument
147 if (bytes.remaining() < size) { in skip()
149 + bytes.remaining() + " remain in the buffer."); in skip()
152 bytes.position(bytes.position() + size); in skip()
163 long read(@Nonnull ByteBuffer bytes) throws IOException { in read() argument
164 if (bytes.remaining() < size) { in read()
166 + bytes.remaining() + " remain in the buffer."); in read()
169 bytes.order(ByteOrder.LITTLE_ENDIAN); in read()
173 r = LittleEndianUtils.readUnsigned2Le(bytes); in read()
175 r = LittleEndianUtils.readUnsigned4Le(bytes); in read()
[all …]
DCentralDirectory.java224 static CentralDirectory makeFromData(@Nonnull ByteBuffer bytes, int count, @Nonnull ZFile file) in makeFromData() argument
226 Preconditions.checkNotNull(bytes, "bytes == null"); in makeFromData()
233 directory.readEntry(bytes); in makeFromData()
240 + bytes.position() in makeFromData()
281 private void readEntry(@Nonnull ByteBuffer bytes) throws IOException { in readEntry() argument
282 F_SIGNATURE.verify(bytes); in readEntry()
283 long madeBy = F_MADE_BY.read(bytes); in readEntry()
285 long versionNeededToExtract = F_VERSION_EXTRACT.read(bytes); in readEntry()
291 long gpBit = F_GP_BIT.read(bytes); in readEntry()
294 long methodCode = F_METHOD.read(bytes); in readEntry()
[all …]
DEocd.java124 Eocd(@Nonnull ByteBuffer bytes) throws IOException { in Eocd() argument
129 F_SIGNATURE.verify(bytes); in Eocd()
130 F_NUMBER_OF_DISK.verify(bytes); in Eocd()
131 F_DISK_CD_START.verify(bytes); in Eocd()
132 long totalRecords1 = F_RECORDS_DISK.read(bytes); in Eocd()
133 long totalRecords2 = F_RECORDS_TOTAL.read(bytes); in Eocd()
134 long directorySize = F_CD_SIZE.read(bytes); in Eocd()
135 long directoryOffset = F_CD_OFFSET.read(bytes); in Eocd()
136 int commentSize = Ints.checkedCast(F_COMMENT_SIZE.read(bytes)); in Eocd()
152 if (bytes.remaining() < commentSize) { in Eocd()
[all …]
DEncodeUtils.java50 public static String decode(@Nonnull ByteBuffer bytes, int length, @Nonnull GPFlags flags) in decode() argument
52 if (bytes.remaining() < length) { in decode()
53 throw new IOException("Only " + bytes.remaining() + " bytes exist in the buffer, but " in decode()
58 bytes.get(stringBytes); in decode()
109 ByteBuffer bytes = charset.encode(name); in encode() local
110 byte[] result = new byte[bytes.remaining()]; in encode()
111 bytes.get(result); in encode()
DStoredEntry.java357 public int read(byte[] bytes) throws IOException { in read() argument
358 if (bytes.length < getCentralDirectoryHeader().getUncompressedSize()) { in read()
363 return ByteStreams.read(is, bytes, 0, bytes.length); in read()
438 ByteBuffer bytes = ByteBuffer.wrap(localHeader); in readLocalHeader() local
439 F_LOCAL_SIGNATURE.verify(bytes); in readLocalHeader()
440 F_VERSION_EXTRACT.verify(bytes, compressInfo.getVersionExtract(), verifyLog); in readLocalHeader()
441 F_GP_BIT.verify(bytes, cdh.getGpBit().getValue(), verifyLog); in readLocalHeader()
442 F_METHOD.verify(bytes, compressInfo.getMethod().methodCode, verifyLog); in readLocalHeader()
445 F_LAST_MOD_TIME.skip(bytes); in readLocalHeader()
446 F_LAST_MOD_DATE.skip(bytes); in readLocalHeader()
[all …]
DZFile.java2613 ByteBuffer bytes = ByteBuffer.wrap(comment, i, comment.length - i); in setEocdComment() local
2615 new Eocd(bytes); in setEocdComment()
/tools/test/connectivity/acts/framework/tests/
Dacts_job_test.py18 from builtins import bytes
42 self._stdout = bytes(stdout,
43 'utf-8') if stdout is not None else bytes()
44 self._stderr = bytes(stderr,
45 'utf-8') if stderr is not None else bytes()
/tools/tradefederation/core/src/com/android/tradefed/util/
DStreamUtil.java335 private static String bytesToHexString(byte[] bytes) { in bytesToHexString() argument
336 Objects.requireNonNull(bytes); in bytesToHexString()
337 StringBuilder sb = new StringBuilder(2 * bytes.length); in bytesToHexString()
338 for (int i = 0; i < bytes.length; i++) { in bytesToHexString()
339 int b = 0x0f & (bytes[i] >> 4); in bytesToHexString()
341 b = 0x0f & bytes[i]; in bytesToHexString()
/tools/test/connectivity/tools/lab/utils/
Djob.py75 stdout=bytes(),
76 stderr=bytes(),
147 out = bytes()
148 err = bytes()
/tools/test/connectivity/acts/framework/acts/libs/proc/
Djob.py75 stdout=bytes(),
76 stderr=bytes(),
147 out = bytes()
148 err = bytes()
/tools/apksig/src/apksigner/java/com/android/apksigner/
DPasswordRetriever.java301 private static char[] castBytesToChars(byte[] bytes) { in castBytesToChars() argument
302 if (bytes == null) { in castBytesToChars()
306 char[] chars = new char[bytes.length]; in castBytesToChars()
307 for (int i = 0; i < bytes.length; i++) { in castBytesToChars()
308 chars[i] = (char) (bytes[i] & 0xff); in castBytesToChars()
/tools/apksig/src/main/java/com/android/apksig/internal/jar/
DManifestParser.java123 byte[] bytes = readAttributeBytes(); in readAttribute()
124 if (bytes == null) { in readAttribute()
126 } else if (bytes.length == 0) { in readAttribute()
129 return new String(bytes, StandardCharsets.UTF_8); in readAttribute()
/tools/metalava/src/main/java/com/android/tools/metalava/apilevels/
DAndroidJarReader.java122 byte[] bytes = ByteStreams.toByteArray(zis); in readJar()
123 if (bytes == null) { in readJar()
129 ClassReader reader = new ClassReader(bytes); in readJar()
/tools/test/connectivity/acts/framework/acts/test_utils/wifi/aware/
Daware_test_utils.py178 obj = bytes()
180 encoded_list.append(base64.b64encode(bytes(obj, 'utf-8')).decode('utf-8'))
213 mf_list.append(bytes([i]))
215 mf_list.append(bytes([255]))
217 mf_list.append(bytes([254, 255]))
/tools/test/connectivity/acts/framework/acts/test_utils/bt/
Dbluetooth.proto110 // bytes transmitted.
113 // bytes transmitted.
/tools/test/connectivity/tools/lab/
DREADME.md56 devices: a list of Device objects, each with name of device, number of bytes
/tools/test/connectivity/acts/tests/google/wifi/rtt/
DREADME.md49 * **lci_reference**, **lcr_reference**: Arrays of bytes used to validate that the *correct* LCI and
/tools/apkzlib/src/test/java/com/android/tools/build/apkzlib/zip/
DZFileTest.java1132 byte[] bytes = new byte[] { 1, 2, 3, 4 }; in zipFileWithEocdMarkerInFileName()
1138 zos.write(bytes); in zipFileWithEocdMarkerInFileName()
1152 byte[] bytes = new byte[] { 0x50, 0x4b, 0x05, 0x06 }; in zipFileWithEocdMarkerInFileContents()
1161 zipEntry.setCrc(Hashing.crc32().hashBytes(bytes).padToLong()); in zipFileWithEocdMarkerInFileContents()
1163 zos.write(bytes); in zipFileWithEocdMarkerInFileContents()
/tools/apksig/src/main/java/com/android/apksig/internal/apk/
DApkSigningBlockUtils.java573 public static byte[] encodeAsLengthPrefixedElement(byte[] bytes) { in encodeAsLengthPrefixedElement() argument
575 adapterBytes[0] = bytes; in encodeAsLengthPrefixedElement()
/tools/metalava/gradle/wrapper/
Dgradle-wrapper.jarMETA-INF/ META-INF/MANIFEST.MF org/ org/gradle/ org/ ...