Home
last modified time | relevance | path

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

12

/development/samples/ApiDemos/src/com/example/android/mmslib/pdu/
DQuotedPrintable.java39 public static final byte[] decodeQuotedPrintable(byte[] bytes) { in decodeQuotedPrintable() argument
40 if (bytes == null) { in decodeQuotedPrintable()
44 for (int i = 0; i < bytes.length; i++) { in decodeQuotedPrintable()
45 int b = bytes[i]; in decodeQuotedPrintable()
48 if('\r' == (char)bytes[i + 1] && in decodeQuotedPrintable()
49 '\n' == (char)bytes[i + 2]) { in decodeQuotedPrintable()
53 int u = Character.digit((char) bytes[++i], 16); in decodeQuotedPrintable()
54 int l = Character.digit((char) bytes[++i], 16); in decodeQuotedPrintable()
/development/apps/Development/src/com/android/development/
DLogViewer.java99 byte[] bytes = new byte[length]; in run()
100 in.readFully(bytes); in run()
102 int tagEnd = next0(bytes, HEADER_SIZE); in run()
103 int fileEnd = next0(bytes, tagEnd + 1); in run()
104 int messageEnd = next0(bytes, fileEnd + 1); in run()
107 = forAsciiBytes(bytes, HEADER_SIZE, tagEnd); in run()
109 = forAsciiBytes(bytes, fileEnd + 1, messageEnd); in run()
131 static int next0(byte[] bytes, int start) { in next0() argument
132 for (int current = start; current < bytes.length; current++) { in next0()
133 if (bytes[current] == 0) in next0()
[all …]
/development/samples/BrokenKeyDerivation/src/com/example/android/brokenkeyderivation/
DInsecureSHA1PRNGKeyDerivator.java224 private void updateSeed(byte[] bytes) { in updateSeed() argument
229 updateHash(seed, bytes, 0, bytes.length - 1); in updateSeed()
231 seedLength += bytes.length; in updateSeed()
278 protected synchronized void nextBytes(byte[] bytes) { in nextBytes() argument
290 if (bytes == null) { in nextBytes()
341 if (bytes.length == 0) { in nextBytes()
348 n = (HASHBYTES_TO_USE - nextBIndex) < (bytes.length - nextByteToReturn) ? HASHBYTES_TO_USE in nextBytes()
350 : bytes.length - nextByteToReturn; in nextBytes()
352 System.arraycopy(nextBytes, nextBIndex, bytes, nextByteToReturn, n); in nextBytes()
357 if (nextByteToReturn >= bytes.length) { in nextBytes()
[all …]
DBrokenKeyDerivationActivity.java240 private void readFromFileOrCreateRandom(String fileName, byte[] bytes) { in readFromFileOrCreateRandom() argument
242 readBytesFromFile(fileName, bytes); in readFromFileOrCreateRandom()
246 sr.nextBytes(bytes); in readFromFileOrCreateRandom()
247 writeToFile(fileName, bytes); in readFromFileOrCreateRandom()
260 private void writeToFile(String fileName, byte[] bytes) { in writeToFile() argument
262 fos.write(bytes); in writeToFile()
268 private void readBytesFromFile(String fileName, byte[] bytes) { in readBytesFromFile() argument
271 while (numBytes < bytes.length) { in readBytesFromFile()
272 int n = fis.read(bytes, numBytes, bytes.length - numBytes); in readBytesFromFile()
/development/tools/axl/
Dchewperf.py59 bytes = sum(x[1] for x in chewed)
60 print "total time", totalTime, "bytes", bytes, "rate", bytes * 1000 / totalTime
65 bytes = x[1]
67 buckets[bucket] += bytes
69 buckets[bucket] = bytes
/development/samples/WiFiDirectServiceDiscovery/src/com/example/android/wifidirect/discovery/
DChatManager.java37 int bytes; in run() local
44 bytes = iStream.read(buffer); in run()
45 if (bytes == -1) { in run()
52 bytes, -1, buffer).sendToTarget(); in run()
/development/samples/Vault/src/com/example/android/vault/
DUtils.java61 ByteArrayOutputStream bytes = new ByteArrayOutputStream(); in readFully() local
65 bytes.write(buffer, 0, count); in readFully()
67 return bytes.toByteArray(); in readFully()
/development/samples/browseable/CardEmulation/src/com.example.android.cardemulation/
DCardService.java119 public static String ByteArrayToHexString(byte[] bytes) { in ByteArrayToHexString() argument
121 char[] hexChars = new char[bytes.length * 2]; // Each byte has two hex characters (nibbles) in ByteArrayToHexString()
123 for (int j = 0; j < bytes.length; j++) { in ByteArrayToHexString()
124 v = bytes[j] & 0xFF; // Cast bytes[j] to int, treating as unsigned value in ByteArrayToHexString()
/development/samples/browseable/CardReader/src/com.example.android.cardreader/
DLoyaltyCardReader.java119 public static String ByteArrayToHexString(byte[] bytes) { in ByteArrayToHexString() argument
121 char[] hexChars = new char[bytes.length * 2]; in ByteArrayToHexString()
123 for ( int j = 0; j < bytes.length; j++ ) { in ByteArrayToHexString()
124 v = bytes[j] & 0xFF; in ByteArrayToHexString()
/development/samples/browseable/PermissionRequest/src/com.example.android.permissionrequest/
DSimpleWebServer.java145 byte[] bytes = loadContent(route); in handle()
146 if (null == bytes) { in handle()
154 output.println("Content-Length: " + bytes.length); in handle()
156 output.write(bytes); in handle()
/development/tools/winscope/src/
DdecodeVideo.js36 function parseUintNLE(buffer, position, bytes) { argument
38 for (var i = bytes - 1; i >= 0; i--) {
/development/samples/USB/AdbTest/src/com/android/adb/
DAdbMessage.java141 byte[] bytes = new byte[length]; in extractString()
143 bytes[i] = buffer.get(offset++); in extractString()
145 return new String(bytes); in extractString()
/development/samples/ApiDemos/src/com/example/android/apis/media/
DAudioFxDemo.java176 public void onWaveFormDataCapture(Visualizer visualizer, byte[] bytes, in setupVisualizerFxAndUI()
178 mVisualizerView.updateVisualizer(bytes); in setupVisualizerFxAndUI()
181 public void onFftDataCapture(Visualizer visualizer, byte[] bytes, int samplingRate) {} in setupVisualizerFxAndUI()
222 public void updateVisualizer(byte[] bytes) { in updateVisualizer() argument
223 mBytes = bytes; in updateVisualizer()
/development/tools/rmtypedefs/src/com/android/tools/rmtypedefs/
DRmTypeDefs.java147 byte[] bytes = Files.toByteArray(file); in checkClass()
148 ClassReader classReader = new ClassReader(bytes); in checkClass()
201 byte[] bytes; in rewriteOuterClasses()
203 bytes = Files.toByteArray(file); in rewriteOuterClasses()
220 ClassReader reader = new ClassReader(bytes); in rewriteOuterClasses()
/development/samples/BluetoothChat/src/com/example/android/BluetoothChat/
DBluetoothChatService.java448 int bytes; in run() local
454 bytes = mmInStream.read(buffer); in run()
457 mHandler.obtainMessage(BluetoothChat.MESSAGE_READ, bytes, -1, buffer) in run()
/development/samples/browseable/BluetoothChat/src/com.example.android.bluetoothchat/
DBluetoothChatService.java488 int bytes; in run() local
494 bytes = mmInStream.read(buffer); in run()
497 mHandler.obtainMessage(Constants.MESSAGE_READ, bytes, -1, buffer) in run()
/development/samples/browseable/DisplayingBitmaps/src/com.example.android.displayingbitmaps/util/
DImageCache.java591 private static String bytesToHexString(byte[] bytes) { in bytesToHexString() argument
594 for (int i = 0; i < bytes.length; i++) { in bytesToHexString()
595 String hex = Integer.toHexString(0xFF & bytes[i]); in bytesToHexString()
/development/samples/ApiDemos/src/com/example/android/apis/content/
DDocumentsSample.java428 ByteArrayOutputStream bytes = new ByteArrayOutputStream(); in readFullyNoClose() local
432 bytes.write(buffer, 0, count); in readFullyNoClose()
434 return bytes.toByteArray(); in readFullyNoClose()
/development/vndk/tools/header-checker/utils/
Dutils.py92 f.write(bytes(output_content, 'utf-8'))
95 f.write(bytes(output_content, 'utf-8'))
/development/tools/winscope/adb_proxy/
Dwinscope_proxy.py238 def call_adb(params: str, device: str = None, stdin: bytes = None): argument
251 def call_adb_outfile(params: str, outfile, device: str = None, stdin: bytes = None): argument
520 def respond(self, code: int, data: bytes, mime: str) -> None: argument
/development/samples/browseable/Camera2Basic/src/com.example.android.camera2basic/
DCamera2BasicFragment.java935 byte[] bytes = new byte[buffer.remaining()]; in run()
936 buffer.get(bytes); in run()
940 output.write(bytes); in run()
/development/samples/browseable/Camera2Raw/src/com.example.android.camera2raw/
DCamera2RawFragment.java1372 byte[] bytes = new byte[buffer.remaining()]; in run()
1373 buffer.get(bytes); in run()
1377 output.write(bytes); in run()
/development/tools/repo_pull/
Drepo_pull.py94 if bytes is str:
/development/samples/training/testingfun/gradle/wrapper/
Dgradle-wrapper.jar ... ) java.security.MessageDigest messageDigest byte[] bytes Exception e String string private java.lang.String ...
/development/samples/devbytes/telephony/SmsSampleProject/gradle/wrapper/
Dgradle-wrapper.jar ... ) java.security.MessageDigest messageDigest byte[] bytes Exception e String string private java.lang.String ...

12