Home
last modified time | relevance | path

Searched refs:ByteBuffer (Results 1 – 25 of 367) sorted by relevance

12345678910>>...15

/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/
DColorSpace.java18 import java.nio.ByteBuffer;
42 ByteBuffer input, ByteBuffer output, int width, int height) { in convertYuv420pToRgba8888()
61 ByteBuffer input, ByteBuffer output, int width, int height) { in convertArgb8888ToRgba8888()
80 ByteBuffer input, ByteBuffer output, int width, int height) { in convertRgba8888ToHsva8888()
99 ByteBuffer input, ByteBuffer output, int width, int height) { in convertRgba8888ToYcbcra8888()
105 private static void expectInputSize(ByteBuffer input, int expectedSize) { in expectInputSize()
113 private static void expectOutputSize(ByteBuffer output, int expectedSize) { in expectOutputSize()
122 ByteBuffer input, ByteBuffer output, int width, int height); in nativeYuv420pToRgba8888()
125 ByteBuffer input, ByteBuffer output, int width, int height); in nativeArgb8888ToRgba8888()
128 ByteBuffer input, ByteBuffer output, int width, int height); in nativeRgba8888ToHsva8888()
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DByteBufferReaderTest.java27 import java.nio.ByteBuffer;
45 ByteBuffer buffer = ByteBuffer.wrap(data).order(ByteOrder.LITTLE_ENDIAN); in readIntegerWithBufferUnderflow()
59 ByteBuffer buffer = ByteBuffer.wrap(data).order(ByteOrder.LITTLE_ENDIAN); in readIntegerExceedingMaximumLength()
73 ByteBuffer buffer = ByteBuffer.wrap(data).order(ByteOrder.LITTLE_ENDIAN); in readIntegerLessThanMinimumLength()
86 ByteBuffer buffer = ByteBuffer.wrap(data).order(ByteOrder.LITTLE_ENDIAN); in readIntegerWithMinimumSize()
102 ByteBuffer leBuffer = ByteBuffer.wrap(data).order(ByteOrder.LITTLE_ENDIAN); in readIntegerWithMaximumSize()
108 ByteBuffer beBuffer = ByteBuffer.wrap(data).order(ByteOrder.BIG_ENDIAN); in readIntegerWithMaximumSize()
122 ByteBufferReader.readString(ByteBuffer.wrap(new byte[10]), -1, StandardCharsets.US_ASCII); in readStringWithNegativeSize()
133 ByteBuffer.wrap(new byte[10]), 0, StandardCharsets.US_ASCII); in readStringWithZeroSize()
146 ByteBuffer buffer = ByteBuffer.wrap(expectedValue.getBytes(StandardCharsets.US_ASCII)); in readString()
[all …]
/frameworks/base/core/java/android/util/apk/
DApkVerityBuilder.java21 import java.nio.ByteBuffer;
50 public final ByteBuffer fsverityData;
53 ApkVerityResult(ByteBuffer fsverityData, byte[] rootHash) { in ApkVerityResult()
77 ByteBuffer output = bufferFactory.create( in generateApkVerity()
82 ByteBuffer tree = slice(output, 0, merkleTreeSize); in generateApkVerity()
83 ByteBuffer header = slice(output, merkleTreeSize, in generateApkVerity()
85 ByteBuffer extensions = slice(output, merkleTreeSize + FSVERITY_HEADER_SIZE_BYTES, in generateApkVerity()
88 ByteBuffer apkDigest = ByteBuffer.wrap(apkDigestBytes); in generateApkVerity()
107 static byte[] generateFsverityRootHash(RandomAccessFile apk, ByteBuffer apkDigest, in generateFsverityRootHash()
110 ByteBuffer verityBlock = ByteBuffer.allocate(CHUNK_SIZE_BYTES) in generateFsverityRootHash()
[all …]
DZipUtils.java23 import java.nio.ByteBuffer;
54 static Pair<ByteBuffer, Long> findZipEndOfCentralDirectoryRecord(RandomAccessFile zip) in findZipEndOfCentralDirectoryRecord()
74 Pair<ByteBuffer, Long> result = findZipEndOfCentralDirectoryRecord(zip, 0); in findZipEndOfCentralDirectoryRecord()
97 private static Pair<ByteBuffer, Long> findZipEndOfCentralDirectoryRecord( in findZipEndOfCentralDirectoryRecord()
121 ByteBuffer buf = ByteBuffer.allocate(ZIP_EOCD_REC_MIN_SIZE + maxCommentSize); in findZipEndOfCentralDirectoryRecord()
133 ByteBuffer eocd = buf.slice(); in findZipEndOfCentralDirectoryRecord()
144 private static int findZipEndOfCentralDirectoryRecord(ByteBuffer zipContents) { in findZipEndOfCentralDirectoryRecord()
209 public static long getZipEocdCentralDirectoryOffset(ByteBuffer zipEndOfCentralDirectory) { in getZipEocdCentralDirectoryOffset()
222 ByteBuffer zipEndOfCentralDirectory, long offset) { in setZipEocdCentralDirectoryOffset()
235 public static long getZipEocdCentralDirectorySizeBytes(ByteBuffer zipEndOfCentralDirectory) { in getZipEocdCentralDirectorySizeBytes()
[all …]
DApkSigningBlockUtils.java26 import java.nio.ByteBuffer;
61 Pair<ByteBuffer, Long> eocdAndOffsetInFile = getEocd(apk); in findSignature()
62 ByteBuffer eocd = eocdAndOffsetInFile.first; in findSignature()
70 Pair<ByteBuffer, Long> apkSigningBlockAndOffsetInFile = in findSignature()
72 ByteBuffer apkSigningBlock = apkSigningBlockAndOffsetInFile.first; in findSignature()
76 ByteBuffer apkSignatureSchemeBlock = findApkSignatureSchemeBlock(apkSigningBlock, in findSignature()
151 ByteBuffer eocdBuf = signatureInfo.eocd.duplicate(); in verifyIntegrityFor1MbChunkBasedAlgorithm()
315 ByteBuffer buffer = ByteBuffer.wrap(data).order(ByteOrder.LITTLE_ENDIAN); in parseVerityDigestAndVerifySourceLength()
338 public ByteBuffer create(int capacity) { in verifyIntegrityForVerityBasedAlgorithm()
339 return ByteBuffer.allocate(capacity); in verifyIntegrityForVerityBasedAlgorithm()
[all …]
DSignatureInfo.java19 import java.nio.ByteBuffer;
27 public final ByteBuffer signatureBlock;
39 public final ByteBuffer eocd;
41 SignatureInfo(ByteBuffer signatureBlock, long apkSigningBlockOffset, long centralDirOffset, in SignatureInfo()
42 long eocdOffset, ByteBuffer eocd) { in SignatureInfo()
/frameworks/base/tests/AccessoryDisplay/common/src/com/android/accessorydisplay/common/
DBufferPool.java19 import java.nio.ByteBuffer;
28 private final ByteBuffer[] mBuffers;
35 mBuffers = new ByteBuffer[maxBuffers]; in BufferPool()
38 public ByteBuffer acquire(int needed) { in acquire()
48 return ByteBuffer.allocate(chooseCapacity(mInitialBufferSize, needed)); in acquire()
59 public void release(ByteBuffer buffer) { in release()
67 public ByteBuffer grow(ByteBuffer buffer, int needed) { in grow()
70 final ByteBuffer oldBuffer = buffer; in grow()
72 buffer = ByteBuffer.allocate(capacity); in grow()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/anqp/
DHSConnectionCapabilityElementTest.java27 import java.nio.ByteBuffer;
48 private void appendProtocolPortTuple(ByteBuffer buffer, ProtocolPortTuple tuple) { in appendProtocolPortTuple()
60 private ByteBuffer getTestBuffer(ProtocolPortTuple[] tuples) { in getTestBuffer()
61 ByteBuffer buffer = ByteBuffer.allocate(tuples.length * ProtocolPortTuple.RAW_BYTE_SIZE) in getTestBuffer()
79 HSConnectionCapabilityElement.parse(ByteBuffer.allocate(0)); in parseEmptyBuffer()
91 ByteBuffer buffer = ByteBuffer.allocate(ProtocolPortTuple.RAW_BYTE_SIZE - 1); in parseBufferWithLessThanMinimumSize()
106 ByteBuffer buffer = ByteBuffer.allocate(ProtocolPortTuple.RAW_BYTE_SIZE + 1); in parseBufferWithIncompleteTupleBytes()
121 ByteBuffer buffer = getTestBuffer(new ProtocolPortTuple[] {TEST_TUPLE1, TEST_TUPLE2}); in parseBufferWithTestData()
DNAIRealmDataTest.java27 import java.nio.ByteBuffer;
41 NAIRealmData.parse(ByteBuffer.wrap(new byte[0])); in parseEmptyBuffer()
52 ByteBuffer buffer = ByteBuffer.wrap(NAIRealmDataTestUtil.TEST_REAML_WITH_UTF8_DATA_BYTES); in parseTruncatedBuffer()
65 ByteBuffer buffer = ByteBuffer.wrap(NAIRealmDataTestUtil.TEST_REAML_WITH_UTF8_DATA_BYTES); in parseBufferWithUTF8EncodedNAIRealmData()
77 ByteBuffer buffer = ByteBuffer.wrap( in parseBufferWithNonUTF8EncodedNAIRealmData()
DHSWanMetricsElementTest.java26 import java.nio.ByteBuffer;
48 private ByteBuffer getTestBuffer() { in getTestBuffer()
49 ByteBuffer buffer = ByteBuffer.allocate(HSWanMetricsElement.EXPECTED_BUFFER_SIZE) in getTestBuffer()
71 HSWanMetricsElement.parse(ByteBuffer.allocate(0)); in parseEmptyBuffer()
82 ByteBuffer buffer = ByteBuffer.allocate(HSWanMetricsElement.EXPECTED_BUFFER_SIZE - 1); in parseBufferWithLessThanExpectedSize()
96 ByteBuffer buffer = ByteBuffer.allocate(HSWanMetricsElement.EXPECTED_BUFFER_SIZE + 1); in parseBufferWithMoreThanExpectedSize()
110 ByteBuffer buffer = getTestBuffer(); in parseBufferWithTestData()
DANQPParserTest.java29 import java.nio.ByteBuffer;
183 ByteBuffer buffer = ByteBuffer.allocate(HSWanMetricsElement.EXPECTED_BUFFER_SIZE) in getHSWanMetricsPayload()
278 ByteBuffer buffer = ByteBuffer.wrap(getVenueNamePayload(language, text)); in parseVenueNameElement()
300 ByteBuffer buffer = ByteBuffer.wrap(new byte[] {(byte) ipAddressAvailability}); in parseIPAddressTypeAvailabilityElement()
316 ByteBuffer buffer = ByteBuffer.wrap(getDomainNamePayload(testNames)); in parseDomainNameElement()
333 ByteBuffer buffer = ByteBuffer.wrap(getRoamingConsortiumPayload(ois, oisLength)); in parseRoamingConsortium()
350 ByteBuffer buffer = ByteBuffer.wrap(getNAIRealmPayload(testBytes)); in parseNAIRealmElement()
370 ByteBuffer buffer = ByteBuffer.wrap(getThreeGPPNetworkPayload( in parseThreeGPPNetworkElement()
384 ByteBuffer buffer = ByteBuffer.wrap( in parseNonHS20VendorSpecificElement()
411 Constants.ANQPElementType.ANQPVendorSpec, ByteBuffer.wrap(data))); in parseVendorSpecificElementWithHSFriendlyName()
[all …]
DVenueNameElementTest.java30 import java.nio.ByteBuffer;
86 VenueNameElement.parse(ByteBuffer.allocate(0)); in parseEmptyBuffer()
97 ByteBuffer buffer = ByteBuffer.wrap(getTestData(new String[] {TEST_VENUE_NAME1})); in parseTruncatedBuffer()
111 ByteBuffer buffer = ByteBuffer.wrap(getTestData(new String[0])); in parseBufferWithEmptyVenueName()
128 ByteBuffer buffer = ByteBuffer.wrap( in parseBufferWithValidVenueNames()
145 ByteBuffer buffer = ByteBuffer.wrap(getTestData(new String[] {text})); in parseBufferWithMaxLengthVenueName()
166 ByteBuffer buffer = ByteBuffer.wrap(getTestData(new String[] {text})); in parseBufferWithVenueNameLengthExceedMax()
DProtocolPortTupleTest.java26 import java.nio.ByteBuffer;
46 private ByteBuffer getTestBuffer(int protocol, int port, int status) { in getTestBuffer()
47 ByteBuffer buffer = ByteBuffer.allocate(ProtocolPortTuple.RAW_BYTE_SIZE) in getTestBuffer()
63 ProtocolPortTuple.parse(ByteBuffer.allocate(0)); in parseEmptyBuffer()
74 ByteBuffer buffer = ByteBuffer.allocate(ProtocolPortTuple.RAW_BYTE_SIZE - 1); in parseBufferWithIncompleteData()
88 ByteBuffer buffer = getTestBuffer(TEST_PROTOCOL, TEST_PORT, TEST_STATUS); in parseBufferWithTestData()
DIPAddressTypeAvailabilityElementTest.java26 import java.nio.ByteBuffer;
49 IPAddressTypeAvailabilityElement.parse(ByteBuffer.allocate(0)); in parseBufferEmptyBuffer()
60 ByteBuffer buffer = ByteBuffer.allocate( in parseBufferWithExcessData()
65 IPAddressTypeAvailabilityElement.parse(ByteBuffer.allocate(0)); in parseBufferWithExcessData()
76 ByteBuffer buffer = ByteBuffer.allocate( in parseBufferWithTestData()
DHSIconFileElementTest.java28 import java.nio.ByteBuffer;
68 HSIconFileElement.parse(ByteBuffer.allocate(0)); in parseEmptyBuffer()
79 ByteBuffer buffer = ByteBuffer.wrap(getTestData(HSIconFileElement.STATUS_CODE_SUCCESS)); in parseTruncatedBuffer()
92 ByteBuffer buffer = ByteBuffer.wrap(getTestData(HSIconFileElement.STATUS_CODE_SUCCESS)); in parseBufferWithIconData()
106 ByteBuffer buffer = in parseBufferWithoutIconData()
107 ByteBuffer.wrap(getTestData(HSIconFileElement.STATUS_CODE_FILE_NOT_FOUND)); in parseBufferWithoutIconData()
DHSOsuProvidersElementTest.java30 import java.nio.ByteBuffer;
74 HSOsuProvidersElement.parse(ByteBuffer.allocate(0)); in parseEmptyBuffer()
85 ByteBuffer buffer = ByteBuffer.wrap(getTestData(TEST_OSU_SSID_BYTES)); in parseTruncatedBuffer()
99 ByteBuffer buffer = ByteBuffer.wrap(getTestData(invalidSsidBytes)); in parseBufferWithInvalidLength()
111 ByteBuffer buffer = ByteBuffer.wrap(getTestData(TEST_OSU_SSID_BYTES)); in parseBufferWithTestData()
DIconInfoTest.java26 import java.nio.ByteBuffer;
39 IconInfo.parse(ByteBuffer.allocate(0)); in parseEmptyBuffer()
50 ByteBuffer buffer = ByteBuffer.wrap(IconInfoTestUtil.TEST_ICON_INFO_RAW_BYTES); in parseTruncatedBuffer()
63 ByteBuffer buffer = ByteBuffer.wrap(IconInfoTestUtil.TEST_ICON_INFO_RAW_BYTES); in parseBufferWithTestData()
DRoamingConsortiumElementTest.java31 import java.nio.ByteBuffer;
112 RoamingConsortiumElement element = RoamingConsortiumElement.parse(ByteBuffer.allocate(0)); in parseEmptyBuffer()
124 ByteBuffer buffer = ByteBuffer.wrap(getDefaultTestData()); in parseTruncatedBuffer()
140 ByteBuffer buffer = ByteBuffer.wrap(getDefaultTestData()); in parseBufferWithDefaultTestData()
152 ByteBuffer buffer = ByteBuffer.allocate(1); in parseBufferWithOILengthLessThanMinimum()
166 ByteBuffer buffer = ByteBuffer.allocate(1); in parseBufferWithOILengthMoreThanMaximum()
DHSFriendlyNameElementTest.java30 import java.nio.ByteBuffer;
86 assertTrue(HSFriendlyNameElement.parse(ByteBuffer.allocate(0)).getNames().isEmpty()); in parseBufferWithEmptyBuffer()
99 ByteBuffer buffer = ByteBuffer.allocate(testData.length - 1); in parseBufferWithTruncatedByte()
114 ByteBuffer buffer = ByteBuffer.allocate(testData.length); in parseBufferWithDefaultTestData()
140 ByteBuffer buffer = ByteBuffer.allocate(testData.length); in parseBufferWithMaxLengthOperatoreName()
164 ByteBuffer buffer = ByteBuffer.allocate(testData.length); in parseBufferWithOperatorNameLengthExceedMax()
/frameworks/base/opengl/java/android/opengl/
DETC1Util.java23 import java.nio.ByteBuffer;
85 ByteBuffer decodedData = ByteBuffer.allocateDirect(stride*height) in loadTexture()
117 public ETC1Texture(int width, int height, ByteBuffer data) { in ETC1Texture()
139 public ByteBuffer getData() { return mData; } in getData()
143 private ByteBuffer mData;
160 ByteBuffer headerBuffer = ByteBuffer.allocateDirect(ETC1.ETC_PKM_HEADER_SIZE) in createTexture()
170ByteBuffer dataBuffer = ByteBuffer.allocateDirect(encodedSize).order(ByteOrder.nativeOrder()); in createTexture()
194 ByteBuffer compressedImage = ByteBuffer.allocateDirect(encodedImageSize). in compressTexture()
207 ByteBuffer dataBuffer = texture.getData(); in writeTexture()
212ByteBuffer header = ByteBuffer.allocateDirect(ETC1.ETC_PKM_HEADER_SIZE).order(ByteOrder.nativeOrde… in writeTexture()
/frameworks/base/tests/net/java/android/net/dhcp/
DDhcpPacketTest.java37 import java.nio.ByteBuffer;
103 public ByteBuffer buildPacket(int encap, short unusedDestUdp, short unusedSrcUdp) { in buildPacket()
104 ByteBuffer result = ByteBuffer.allocate(MAX_LENGTH); in buildPacket()
110 public void finishPacket(ByteBuffer buffer) { in finishPacket()
128 public ByteBuffer build() { in build()
130 ByteBuffer pkt = buildPacket(ENCAP_BOOTP, (short) 0, (short) 0); in build()
139 ByteBuffer packet = new TestDhcpPacket(DHCP_MESSAGE_TYPE_OFFER) in assertDomainAndVendorInfoParses()
184 ByteBuffer packet = testPacket.build(); in assertLeaseTimeParses()
237 ByteBuffer packet = new TestDhcpPacket(type, clientIp, yourIp) in checkIpAddress()
300 final ByteBuffer packet = ByteBuffer.wrap(HexDump.hexStringToByteArray( in testOffer1()
[all …]
/frameworks/base/core/java/android/net/util/
DIpUtils.java23 import java.nio.ByteBuffer;
46 private static int checksum(ByteBuffer buf, int seed, int start, int end) { in checksum()
83 ByteBuffer buf, int headerOffset, int protocol, int transportLen) { in pseudoChecksumIPv4()
93 ByteBuffer buf, int headerOffset, int protocol, int transportLen) { in pseudoChecksumIPv6()
101 private static byte ipversion(ByteBuffer buf, int headerOffset) { in ipversion()
105 public static short ipChecksum(ByteBuffer buf, int headerOffset) { in ipChecksum()
110 private static short transportChecksum(ByteBuffer buf, int protocol, in transportChecksum()
132 public static short udpChecksum(ByteBuffer buf, int ipOffset, int transportOffset) { in udpChecksum()
137 public static short tcpChecksum(ByteBuffer buf, int ipOffset, int transportOffset, in tcpChecksum()
/frameworks/base/core/java/android/hardware/camera2/marshal/impl/
DMarshalQueryablePrimitive.java26 import java.nio.ByteBuffer;
64 public T unmarshal(ByteBuffer buffer) { in unmarshal()
74 public void marshal(T value, ByteBuffer buffer) { in marshal()
104 private void marshalPrimitive(int value, ByteBuffer buffer) { in marshalPrimitive()
108 private void marshalPrimitive(float value, ByteBuffer buffer) { in marshalPrimitive()
112 private void marshalPrimitive(double value, ByteBuffer buffer) { in marshalPrimitive()
116 private void marshalPrimitive(long value, ByteBuffer buffer) { in marshalPrimitive()
120 private void marshalPrimitive(Rational value, ByteBuffer buffer) { in marshalPrimitive()
125 private void marshalPrimitive(byte value, ByteBuffer buffer) { in marshalPrimitive()
129 private Object unmarshalObject(ByteBuffer buffer) { in unmarshalObject()
/frameworks/base/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/presentation/
DCube.java19 import java.nio.ByteBuffer;
72 ByteBuffer vbb = ByteBuffer.allocateDirect(vertices.length*4); in Cube()
78 ByteBuffer cbb = ByteBuffer.allocateDirect(colors.length*4); in Cube()
84 mIndexBuffer = ByteBuffer.allocateDirect(indices.length); in Cube()
99 private ByteBuffer mIndexBuffer;
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/
DFrameParser.java23 import java.nio.ByteBuffer;
54 ByteBuffer frameBuffer = ByteBuffer.wrap(frameBytes); in FrameParser()
70 private static short getUnsignedByte(ByteBuffer data) { in getUnsignedByte()
77 private static int getUnsignedShort(ByteBuffer data) { in getUnsignedShort()
88 private void parseEthernetFrame(ByteBuffer data) { in parseEthernetFrame()
126 private void parseIpv4Packet(ByteBuffer data) { in parseIpv4Packet()
177 private void parseTcpPacket(ByteBuffer data) { in parseTcpPacket()
194 private void parseUdpPacket(ByteBuffer data) { in parseUdpPacket()
227 private void parseDhcpPacket(ByteBuffer data) { in parseDhcpPacket()
293 private void parseIcmpPacket(ByteBuffer data) { in parseIcmpPacket()
[all …]

12345678910>>...15