Searched defs:bytes (Results 1 - 24 of 24) sorted by relevance

/packages/apps/Camera/src/com/android/camera/
H A DExif.java122 private static int pack(byte[] bytes, int offset, int length, argument
132 value = (value << 8) | (bytes[offset] & 0xFF);
/packages/apps/CertInstaller/src/com/android/certinstaller/
H A DUtil.java45 static <T> T fromBytes(byte[] bytes) { argument
46 if (bytes == null) return null;
49 new ObjectInputStream(new ByteArrayInputStream(bytes));
57 static String toMd5(byte[] bytes) { argument
61 algorithm.update(bytes);
70 private static String toHexString(byte[] bytes, String separator) { argument
72 for (byte b : bytes) {
H A DCredentialHelper.java88 byte[] bytes = bundle.getByteArray(key);
89 Log.d(TAG, " " + key + ": " + ((bytes == null) ? -1 : bytes.length));
90 mBundle.put(key, bytes);
119 byte[] bytes = savedStates.getByteArray(Credentials.USER_PRIVATE_KEY);
120 if (bytes != null) {
121 setPrivateKey(bytes);
134 private void parseCert(byte[] bytes) { argument
135 if (bytes == null) {
143 new ByteArrayInputStream(bytes));
195 setPrivateKey(byte[] bytes) argument
[all...]
/packages/apps/Contacts/src/com/android/contacts/util/
H A DBitmapUtil.java32 public static int getSmallerExtentFromBytes(byte[] bytes) { argument
37 BitmapFactory.decodeByteArray(bytes, 0, bytes.length, options);
69 public static Bitmap decodeBitmapFromBytes(byte[] bytes, int sampleSize) { argument
77 return BitmapFactory.decodeByteArray(bytes, 0, bytes.length, options);
/packages/apps/Gallery2/src/com/android/gallery3d/data/
H A DExif.java138 private static int pack(byte[] bytes, int offset, int length, argument
148 value = (value << 8) | (bytes[offset] & 0xFF);
H A DDecodeUtils.java67 public static Bitmap decode(JobContext jc, byte[] bytes, Options options) { argument
68 return decode(jc, bytes, 0, bytes.length, options);
71 public static Bitmap decode(JobContext jc, byte[] bytes, int offset, argument
76 BitmapFactory.decodeByteArray(bytes, offset, length, options));
79 public static void decodeBounds(JobContext jc, byte[] bytes, int offset, argument
84 BitmapFactory.decodeByteArray(bytes, offset, length, options);
185 JobContext jc, byte[] bytes, int offset, int length,
187 if (offset < 0 || length <= 0 || offset + length > bytes.length) {
189 "offset = %s, length = %s, bytes
184 createBitmapRegionDecoder( JobContext jc, byte[] bytes, int offset, int length, boolean shareable) argument
[all...]
/packages/apps/LegacyCamera/src/com/android/camera/
H A DExif.java121 private static int pack(byte[] bytes, int offset, int length, argument
131 value = (value << 8) | (bytes[offset] & 0xFF);
/packages/apps/Settings/src/com/android/settings/fuelgauge/
H A DUtils.java24 * Contains utility functions for formatting elapsed time and consumed bytes
69 * Formats data size in KB, MB, from the given bytes.
71 * @param bytes data size in bytes
72 * @return the formatted size such as 4.52 MB or 245 KB or 332 bytes
74 public static String formatBytes(Context context, double bytes) { argument
76 if (bytes > 1000 * 1000) {
77 return String.format("%.2f MB", ((int) (bytes / 1000)) / 1000f);
78 } else if (bytes > 1024) {
79 return String.format("%.2f KB", ((int) (bytes / 1
[all...]
/packages/apps/Email/src/org/apache/commons/io/input/
H A DNullInputStream.java34 * large numbers of bytes - significantly speeding up
52 * protected void processBytes(byte[] bytes, int offset, int length) {
54 * bytes[i] = ... // set array value here
119 * Return the number of bytes that can be read.
121 * @return The number of bytes that can be read.
149 * @param readlimit The number of bytes before this marked position
192 * Read some bytes into the specified array.
194 * @param bytes The byte array to read into
195 * @return The number of bytes read or <code>-1</code>
202 public int read(byte[] bytes) throw argument
219 read(byte[] bytes, int offset, int length) argument
309 processBytes(byte[] bytes, int offset, int length) argument
[all...]
/packages/apps/Tag/canon/src/com/android/apps/tagcanon/
H A DTagCanon.java110 public TagDescription(String title, byte[] bytes) { argument
113 msgs = new NdefMessage[] { new NdefMessage(bytes) };
/packages/apps/Browser/tests/src/com/android/browser/
H A DWebStorageSizeManagerUnitTests.java77 private long bytes(double megabytes) { method in class:WebStorageSizeManagerUnitTests
88 mDiskInfo.setTotalSizeBytes(bytes(75));
89 mDiskInfo.setFreeSpaceSizeBytes(bytes(24));
97 long origin1EstimatedSize = bytes(3.5);
105 long origin2EstimatedSize = bytes(2.5);
128 long origin3EstimatedSize = bytes(5);
146 manager.onExceededDatabaseQuota("4", "4", 0, bytes(1), totalUsedQuota, mQuotaUpdater);
150 mAppCacheInfo.setAppCacheSizeBytes(bytes(2));
152 manager.onReachedMaxAppCacheSize(bytes(2), totalUsedQuota, mQuotaUpdater);
160 manager.onReachedMaxAppCacheSize(bytes(1.
[all...]
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/
H A DFingerprint.java47 // 16 bytes for 128-bit fingerprint
65 // md5 digest bytes.
71 public Fingerprint(byte[] bytes) { argument
72 if ((bytes == null) || (bytes.length != FINGERPRINT_BYTE_LENGTH)) {
75 mMd5Digest = bytes;
91 byte[] bytes = new byte[8192];
94 int n = in.read(bytes);
115 // decode the hex bytes of the fingerprint portion
116 byte[] bytes
184 appendHexFingerprint(StringBuilder sb, byte[] bytes) argument
[all...]
/packages/apps/Email/src/org/apache/james/mime4j/codec/
H A DEncoderUtil.java336 byte[] bytes = encode(text, charset);
339 encoding = determineEncoding(bytes, usage);
343 return encodeB(prefix, text, usedCharacters, charset, bytes);
346 return encodeQ(prefix, text, usage, usedCharacters, charset, bytes);
354 * @param bytes
358 public static String encodeB(byte[] bytes) { argument
362 final int end = bytes.length;
364 int data = (bytes[idx] & 0xff) << 16 | (bytes[idx + 1] & 0xff) << 8
365 | bytes[id
401 encodeQ(byte[] bytes, Usage usage) argument
512 encodeB(String prefix, String text, int usedCharacters, Charset charset, byte[] bytes) argument
536 bEncodedLength(byte[] bytes) argument
540 encodeQ(String prefix, String text, Usage usage, int usedCharacters, Charset charset, byte[] bytes) argument
564 qEncodedLength(byte[] bytes, Usage usage) argument
608 determineEncoding(byte[] bytes, Usage usage) argument
[all...]
/packages/apps/Exchange/exchange2/src/com/android/exchange/
H A DEasAccountService.java521 protected EasResponse sendPing(byte[] bytes, int heartbeat) throws IOException { argument
526 return sendHttpClientPost(EasSyncService.PING_COMMAND, new ByteArrayEntity(bytes),
H A DEasSyncService.java1245 public EasResponse sendHttpClientPost(String cmd, byte[] bytes) throws IOException { argument
1246 return sendHttpClientPost(cmd, new ByteArrayEntity(bytes), COMMAND_TIMEOUT);
1253 protected EasResponse sendPing(byte[] bytes, int heartbeat) throws IOException { argument
1255 return sendHttpClientPost(PING_COMMAND, new ByteArrayEntity(bytes), (heartbeat+5)*SECONDS);
/packages/apps/Exchange/exchange2/tests/src/com/android/exchange/utility/
H A DCalendarUtilitiesTests.java117 byte[] bytes = new byte[] {0, 1, 2, 3, 4, 5, 6, 7};
120 assertEquals(0x0100, CalendarUtilities.getWord(bytes, 0));
121 assertEquals(0x03020100, CalendarUtilities.getLong(bytes, 0));
122 assertEquals(0x07060504, CalendarUtilities.getLong(bytes, 4));
125 CalendarUtilities.setWord(bytes, 0, 0xDEAD);
126 CalendarUtilities.setLong(bytes, 2, 0xBEEFBEEF);
127 CalendarUtilities.setWord(bytes, 6, 0xCEDE);
130 assertEquals(0xDEAD, CalendarUtilities.getWord(bytes, 0));
131 assertEquals(0xBEEFBEEF, CalendarUtilities.getLong(bytes, 2));
132 assertEquals(0xCEDE, CalendarUtilities.getWord(bytes,
808 parseIcsContent(byte[] bytes) argument
[all...]
/packages/apps/Exchange/tests/src/com/android/exchange/utility/
H A DCalendarUtilitiesTests.java117 byte[] bytes = new byte[] {0, 1, 2, 3, 4, 5, 6, 7};
120 assertEquals(0x0100, CalendarUtilities.getWord(bytes, 0));
121 assertEquals(0x03020100, CalendarUtilities.getLong(bytes, 0));
122 assertEquals(0x07060504, CalendarUtilities.getLong(bytes, 4));
125 CalendarUtilities.setWord(bytes, 0, 0xDEAD);
126 CalendarUtilities.setLong(bytes, 2, 0xBEEFBEEF);
127 CalendarUtilities.setWord(bytes, 6, 0xCEDE);
130 assertEquals(0xDEAD, CalendarUtilities.getWord(bytes, 0));
131 assertEquals(0xBEEFBEEF, CalendarUtilities.getLong(bytes, 2));
132 assertEquals(0xCEDE, CalendarUtilities.getWord(bytes,
808 parseIcsContent(byte[] bytes) argument
[all...]
/packages/apps/Mms/src/com/android/mms/util/
H A DThumbnailManager.java360 private Bitmap requestDecode(byte[] bytes, int offset, argument
366 BitmapFactory.decodeByteArray(bytes, offset, length, options));
/packages/apps/Exchange/exchange2/src/com/android/exchange/adapter/
H A DParser.java111 // The value read, as bytes
112 public byte[] bytes; field in class:Parser
235 return bytes;
355 * Initializes the parser with an input stream; reads the first 4 bytes (which are always the
494 bytes = new byte[length];
496 bytes[i] = (byte)readByte();
/packages/apps/Browser/src/com/android/browser/preferences/
H A DWebsiteSettingsFragment.java405 public String sizeValueToString(long bytes) { argument
407 // bytes should always be greater than zero.
408 if (bytes <= 0) {
409 Log.e(LOGTAG, "sizeValueToString called with non-positive value: " + bytes);
412 float megabytes = (float) bytes / (1024.0F * 1024.0F);
/packages/apps/Camera/jni/
H A Dfeature_mos_jni.cpp406 jfloatArray bytes = env->NewFloatArray(11); local
407 if(bytes != 0)
409 env->SetFloatArrayRegion(bytes, 0, 11, (jfloat*) gTRS);
411 return bytes;
465 jfloatArray bytes = env->NewFloatArray(11); local
466 if(bytes != 0)
468 env->SetFloatArrayRegion(bytes, 0, 11, (jfloat*) gTRS);
470 return bytes;
603 jintArray bytes = env->NewIntArray(imageSize+2); local
604 if (bytes
654 jbyteArray bytes = env->NewByteArray(imageSize+8); local
[all...]
/packages/apps/LegacyCamera/jni/
H A Dfeature_mos_jni.cpp406 jfloatArray bytes = env->NewFloatArray(11); local
407 if(bytes != 0)
409 env->SetFloatArrayRegion(bytes, 0, 11, (jfloat*) gTRS);
411 return bytes;
465 jfloatArray bytes = env->NewFloatArray(11); local
466 if(bytes != 0)
468 env->SetFloatArrayRegion(bytes, 0, 11, (jfloat*) gTRS);
470 return bytes;
603 jintArray bytes = env->NewIntArray(imageSize+2); local
604 if (bytes
654 jbyteArray bytes = env->NewByteArray(imageSize+8); local
[all...]
/packages/apps/Contacts/src/com/android/contacts/
H A DContactPhotoManager.java235 * @param photoBytes The bytes that were parsed to create the bitmap.
286 final byte[] bytes; field in class:ContactPhotoManagerImpl.BitmapHolder
294 public BitmapHolder(byte[] bytes, int originalSmallerExtent) { argument
295 this.bytes = bytes;
304 * An LRU cache for bitmap holders. The cache contains bytes for photos just
323 * them from bytes (the bytes are stored in {@link #mBitmapHolderCache}.
388 return value.bytes != null ? value.bytes
405 btk(int bytes) argument
755 cacheBitmap(Object key, byte[] bytes, boolean preloading, int requestedExtent) argument
[all...]
/packages/apps/Exchange/exchange2/src/com/android/exchange/utility/
H A DCalendarUtilities.java195 static int getLong(byte[] bytes, int offset) { argument
196 return (bytes[offset++] & 0xFF) | ((bytes[offset++] & 0xFF) << 8) |
197 ((bytes[offset++] & 0xFF) << 16) | ((bytes[offset] & 0xFF) << 24);
201 static void setLong(byte[] bytes, int offset, int value) { argument
202 bytes[offset++] = (byte) (value & 0xFF);
203 bytes[offset++] = (byte) ((value >> 8) & 0xFF);
204 bytes[offset++] = (byte) ((value >> 16) & 0xFF);
205 bytes[offse
209 getWord(byte[] bytes, int offset) argument
214 setWord(byte[] bytes, int offset, int value) argument
236 putRuleIntoTimeZoneInformation(byte[] bytes, int offset, RRule rrule, int hour, int minute) argument
250 putTransitionMillisIntoSystemTime(byte[] bytes, int offset, long millis) argument
271 getTimeZoneDateFromSystemTime(byte[] bytes, int offset) argument
[all...]

Completed in 467 milliseconds