Searched refs:bytes (Results 1 - 25 of 192) sorted by relevance

12345678

/dalvik/libcore/security/src/main/java/org/bouncycastle/util/
H A DBigIntegers.java19 byte[] bytes = value.toByteArray();
21 if (bytes[0] == 0)
23 byte[] tmp = new byte[bytes.length - 1];
25 System.arraycopy(bytes, 1, tmp, 0, tmp.length);
30 return bytes;
H A DStrings.java8 public static String fromUTF8ByteArray(byte[] bytes) argument
13 while (i < bytes.length)
16 if ((bytes[i] & 0xf0) == 0xf0)
22 else if ((bytes[i] & 0xe0) == 0xe0)
26 else if ((bytes[i] & 0xc0) == 0xc0)
41 while (i < bytes.length)
45 if ((bytes[i] & 0xf0) == 0xf0)
47 int codePoint = ((bytes[i] & 0x0F) << 18) | ((bytes[i+1] & 0x3F) << 12) | ((bytes[
[all...]
/dalvik/libcore/security/src/main/java/org/bouncycastle/asn1/
H A DDERInteger.java9 byte[] bytes; field in class:DERInteger
56 bytes = BigInteger.valueOf(value).toByteArray();
62 bytes = value.toByteArray();
66 byte[] bytes)
68 this.bytes = bytes;
73 return new BigInteger(bytes);
82 return new BigInteger(1, bytes);
89 out.writeEncoded(INTEGER, bytes);
96 for (int i = 0; i != bytes
65 DERInteger( byte[] bytes) argument
[all...]
H A DDEREnumerated.java9 byte[] bytes; field in class:DEREnumerated
56 bytes = BigInteger.valueOf(value).toByteArray();
62 bytes = value.toByteArray();
66 byte[] bytes)
68 this.bytes = bytes;
73 return new BigInteger(bytes);
80 out.writeEncoded(ENUMERATED, bytes);
93 if (bytes.length != other.bytes
65 DEREnumerated( byte[] bytes) argument
[all...]
H A DDERInputStream.java47 throw new IOException("DER length more than 4 bytes");
73 byte[] bytes)
76 int left = bytes.length;
85 int l = read(bytes, bytes.length - left, left);
102 byte[] bytes)
110 ByteArrayInputStream bIn = new ByteArrayInputStream(bytes);
128 bIn = new ByteArrayInputStream(bytes);
148 return DERBoolean.getInstance(bytes);
151 return new DERInteger(bytes);
72 readFully( byte[] bytes) argument
100 buildObject( int tag, byte[] bytes) argument
[all...]
H A DASN1InputStream.java95 throw new IOException("DER length more than 4 bytes");
126 byte[] bytes)
129 int left = bytes.length;
137 while ((len = read(bytes, bytes.length - left, left)) > 0)
158 byte[] bytes)
163 return new DERApplicationSpecific(tag, bytes);
173 ASN1InputStream aIn = new ASN1InputStream(bytes);
186 aIn = new ASN1InputStream(bytes);
200 return DERBoolean.getInstance(bytes);
125 readFully( byte[] bytes) argument
155 buildObject( int tag, int tagNo, byte[] bytes) argument
[all...]
H A DDERTaggedObject.java60 byte[] bytes = bOut.toByteArray();
64 out.writeEncoded(CONSTRUCTED | TAGGED | tagNo, bytes);
71 if ((bytes[0] & CONSTRUCTED) != 0)
73 bytes[0] = (byte)(CONSTRUCTED | TAGGED | tagNo);
77 bytes[0] = (byte)(TAGGED | tagNo);
80 out.write(bytes);
H A DDERBitString.java64 * return the correct number of bytes for a bit string defined in
69 int bytes = 4;
76 bytes--;
79 byte[] result = new byte[bytes];
80 for (int i = 0; i < bytes; i++)
103 byte[] bytes = ((ASN1OctetString)obj).getOctets();
104 int padBits = bytes[0];
105 byte[] data = new byte[bytes.length - 1];
107 System.arraycopy(bytes, 1, data, 0, bytes
[all...]
/dalvik/libcore/security/src/main/java/org/bouncycastle/crypto/
H A DPBEParametersGenerator.java22 * @param password the password converted into bytes (see below).
104 byte[] bytes = new byte[password.length];
106 for (int i = 0; i != bytes.length; i++)
108 bytes[i] = (byte)password[i];
111 return bytes;
116 * PKCS12 (unicode, big endian, 2 zero pad bytes at the end).
127 // +1 for extra 2 pad bytes.
128 byte[] bytes = new byte[(password.length + 1) * 2];
132 bytes[i * 2] = (byte)(password[i] >>> 8);
133 bytes[
[all...]
/dalvik/libcore/luni/src/main/java/org/apache/harmony/luni/net/
H A DNetUtil.java96 static void intToBytes(int value, byte bytes[], int start) { argument
101 bytes[start] = (byte) ((value >> 24) & 255);
102 bytes[start + 1] = (byte) ((value >> 16) & 255);
103 bytes[start + 2] = (byte) ((value >> 8) & 255);
104 bytes[start + 3] = (byte) (value & 255);
107 static int bytesToInt(byte bytes[], int start) { argument
110 * to an integer, it has bits on in the first 3 bytes, we are only
114 int value = ((bytes[start + 3] & 255)) | ((bytes[start + 2] & 255) << 8)
115 | ((bytes[star
[all...]
/dalvik/libcore/security/src/main/java/org/apache/harmony/security/asn1/
H A DBitString.java44 public final byte[] bytes; field in class:BitString
54 * @param bytes - array of bytes that represents bit string,
59 public BitString(byte[] bytes, int unusedBits) { argument
67 if (bytes.length == 0 && unusedBits != 0) {
72 this.bytes = bytes;
87 bytes = new byte[size];
96 return (bytes[index] & SET_MASK[offset]) != 0;
103 bytes[inde
[all...]
/dalvik/dx/src/com/android/dx/cf/iface/
H A DParseObserver.java37 * @param bytes {@code non-null;} the source that is being parsed
38 * @param offset offset into {@code bytes} for the start of the
43 public void startParsingMember(ByteArray bytes, int offset, String name, argument
49 * @param bytes {@code non-null;} the source that was parsed
50 * @param offset offset into {@code bytes} for the end of the
56 public void endParsingMember(ByteArray bytes, int offset, String name, argument
62 * @param bytes {@code non-null;} the source that was parsed
63 * @param offset offset into {@code bytes} for what was parsed
64 * @param len number of bytes parsed
67 public void parsed(ByteArray bytes, in argument
[all...]
/dalvik/dx/src/com/android/dx/util/
H A DOutput.java27 * bytes written to this instance.
76 * @return {@code 1..5;} the number of bytes actually written
86 * @return {@code 1..5;} the number of bytes actually written
93 * @param bytes {@code non-null;} the array to write
95 public void write(ByteArray bytes); argument
100 * @param bytes {@code non-null;} the array to write
101 * @param offset {@code >= 0;} offset into {@code bytes} for the first
103 * @param length {@code >= 0;} number of bytes to write
105 public void write(byte[] bytes, int offset, int length); argument
109 * a convenient shorthand for {@code write(bytes,
113 write(byte[] bytes) argument
[all...]
H A DByteArray.java31 private final byte[] bytes; field in class:ByteArray
36 /** {@code >= 0, <= bytes.length}; size computed as
43 * @param bytes {@code non-null;} the underlying array
45 * @param end {@code >= start, <= bytes.length;} end index of
48 public ByteArray(byte[] bytes, int start, int end) { argument
49 if (bytes == null) {
50 throw new NullPointerException("bytes == null");
61 if (end > bytes.length) {
62 throw new IllegalArgumentException("end > bytes.length");
65 this.bytes
75 ByteArray(byte[] bytes) argument
111 underlyingOffset(int offset, byte[] bytes) argument
[all...]
/dalvik/dx/src/com/android/dx/rop/cst/
H A DCstUtf8.java35 /** {@code non-null;} the UTF-8 value as bytes */
36 private final ByteArray bytes; field in class:CstUtf8
44 * @return {@code non-null;} the UTF-8 bytes for it
48 byte[] bytes = new byte[len * 3]; // Avoid having to reallocate.
54 bytes[outAt] = (byte) c;
57 bytes[outAt] = (byte) (((c >> 6) & 0x1f) | 0xc0);
58 bytes[outAt + 1] = (byte) ((c & 0x3f) | 0x80);
61 bytes[outAt] = (byte) (((c >> 12) & 0x0f) | 0xe0);
62 bytes[outAt + 1] = (byte) (((c >> 6) & 0x3f) | 0x80);
63 bytes[outA
79 utf8BytesToString(ByteArray bytes) argument
194 CstUtf8(ByteArray bytes) argument
[all...]
/dalvik/dx/src/com/android/dx/command/dump/
H A DClassDumper.java33 * @param bytes {@code non-null;} bytes of the (alleged) class file
40 public static void dump(byte[] bytes, PrintStream out, argument
43 new ClassDumper(bytes, out, filePath, args);
51 private ClassDumper(byte[] bytes, PrintStream out, argument
53 super(bytes, out, filePath, args);
60 byte[] bytes = getBytes();
61 ByteArray ba = new ByteArray(bytes);
70 if (at != bytes.length) {
71 parsed(ba, at, bytes
[all...]
H A DMain.java49 } else if (arg.equals("--bytes")) {
88 byte[] bytes = FileUtils.readFile(name);
92 src = new String(bytes, "utf-8");
96 bytes = HexParser.parse(src);
98 processOne(name, bytes);
114 * @param bytes {@code non-null;} contents of the file
116 private static void processOne(String name, byte[] bytes) { argument
118 DotDumper.dump(bytes, name, parsedArgs);
120 BlockDumper.dump(bytes, System.out, name, false, parsedArgs);
122 BlockDumper.dump(bytes, Syste
[all...]
/dalvik/dx/src/com/android/dx/cf/direct/
H A DDirectClassFile.java79 /** {@code non-null;} the bytes of the file */
80 private final ByteArray bytes; field in class:DirectClassFile
165 * @param bytes {@code non-null;} the bytes of the file
173 public DirectClassFile(ByteArray bytes, String filePath, argument
175 if (bytes == null) {
176 throw new NullPointerException("bytes == null");
184 this.bytes = bytes;
192 * @param bytes {
200 DirectClassFile(byte[] bytes, String filePath, boolean strictParse) argument
561 private final ByteArray bytes; field in class:DirectClassFile.DcfTypeList
579 DcfTypeList(ByteArray bytes, int offset, int size, StdConstantPool pool, ParseObserver observer) argument
[all...]
H A DAttributeFactory.java56 * Parses and makes an attribute based on the bytes at the
64 * @param offset offset into {@code dcf}'s {@code bytes}
82 ByteArray bytes = cf.getBytes();
84 int nameIdx = bytes.getUnsignedShort(offset);
85 int length = bytes.getInt(offset + 2);
90 observer.parsed(bytes, offset, 2,
92 observer.parsed(bytes, offset + 2, 4,
115 * @param offset offset into {@code bytes} to start parsing at; this
124 ByteArray bytes = cf.getBytes();
126 Attribute result = new RawAttribute(name, bytes, offse
[all...]
H A DMemberListParser.java59 * @param offset offset in {@code bytes} to the start of the list
118 ByteArray bytes = cf.getBytes();
119 return bytes.getUnsignedShort(offset);
177 ByteArray bytes = cf.getBytes();
181 observer.parsed(bytes, offset, 2,
187 int accessFlags = bytes.getUnsignedShort(at);
188 int nameIdx = bytes.getUnsignedShort(at + 2);
189 int descIdx = bytes.getUnsignedShort(at + 4);
194 observer.startParsingMember(bytes, at, name.getString(),
196 observer.parsed(bytes, a
[all...]
/dalvik/libcore/support/src/test/java/org/apache/harmony/security/tests/support/
H A DRandomImpl.java40 protected void engineNextBytes(byte[] bytes) { argument
42 for (int i = 0; i < bytes.length; i++) {
43 bytes[i] = (byte)(i + 0xF1);
/dalvik/libcore/nio/src/main/java/java/nio/
H A DHeapByteBuffer.java179 int bytes = 0;
182 bytes = bytes << 8;
183 bytes = bytes | (backingArray[baseOffset + i] & 0xFF);
187 bytes = bytes << 8;
188 bytes = bytes | (backingArray[baseOffset + i] & 0xFF);
191 return bytes;
[all...]
/dalvik/libcore/nio/src/main/java/org/apache/harmony/nio/internal/
H A DIOUtil.java49 public static int readInputStreamReader(InputStream in, ByteBuffer bytes, argument
55 fillBuf(in, bytes, chars, decoder);
71 InputStream in, ByteBuffer bytes, CharBuffer chars,
81 fillBuf(in, bytes, chars, decoder);
96 fillBuf(in, bytes, chars, decoder);
116 private static void fillBuf(InputStream in, ByteBuffer bytes, argument
121 read = in.read(bytes.array());
130 bytes.limit(read);
132 CoderResult result = decoder.decode(bytes, chars, endOfInput);
136 bytes
70 readInputStreamReader(char[] buf, int offset, int length, InputStream in, ByteBuffer bytes, CharBuffer chars, CharsetDecoder decoder, Object lock) argument
143 writeOutputStreamWriter(String str, int offset, int count, OutputStream out, ByteBuffer bytes, CharsetEncoder encoder, Object lock) argument
154 writeOutputStreamWriter(int oneChar, OutputStream out, ByteBuffer bytes, CharsetEncoder encoder, Object lock) argument
170 writeOutputStreamWriter(char[] buf, int offset, int count, OutputStream out, ByteBuffer bytes, CharsetEncoder encoder, Object lock) argument
181 flushOutputStreamWriter(OutputStream out, ByteBuffer bytes, CharsetEncoder encoder, Object lock) argument
202 convert(Object lock, CharsetEncoder encoder, ByteBuffer bytes, CharBuffer chars, OutputStream out) argument
[all...]
/dalvik/libcore/security/src/main/java/java/security/
H A DSecureRandomSpi.java43 * Generates and stores random bytes in the given {@code byte[]} for each
46 * @param bytes
47 * the {@code byte[]} to be filled with random bytes.
49 protected abstract void engineNextBytes(byte[] bytes); argument
52 * Generates and returns the specified number of seed bytes, computed using
56 * the number of seed bytes.
57 * @return the seed bytes
/dalvik/libcore/luni/src/main/java/java/io/
H A DInputStreamReader.java39 * of bytes read from the source stream and converts these into characters as
53 ByteBuffer bytes = ByteBuffer.allocate(BUFFER_SIZE); field in class:InputStreamReader
73 bytes.limit(0);
78 * character converter that is used to decode bytes into characters is
106 bytes.limit(0);
123 bytes.limit(0);
141 bytes.limit(0);
168 * Returns the name of the encoding used to convert bytes into characters.
183 * with the two higher-order bytes set to 0. Returns -1 if the end of the
185 * converting bytes i
[all...]

Completed in 6665 milliseconds

12345678