/libcore/ojluni/src/main/java/java/security/ |
H A D | SecureRandomSpi.java | 54 * Generates a user-specified number of random bytes. 61 * @param bytes the array to be filled in with random bytes. 63 protected abstract void engineNextBytes(byte[] bytes); argument 66 * Returns the given number of seed bytes. This call may be used to 69 * @param numBytes the number of seed bytes to generate. 71 * @return the seed bytes.
|
/libcore/luni/src/main/java/libcore/util/ |
H A D | CharsetUtils.java | 28 * Returns a new byte array containing the bytes corresponding to the characters in the given 35 * Returns a new byte array containing the bytes corresponding to the characters in the given 42 * Returns a new byte array containing the bytes corresponding to the characters in the given 49 * Returns a new byte array containing the bytes corresponding to the characters in the given 65 * Decodes the given US-ASCII bytes into the given char[]. Equivalent to but faster than: 73 public static native void asciiBytesToChars(byte[] bytes, int offset, int length, char[] chars); argument 76 * Decodes the given ISO-8859-1 bytes into the given char[]. Equivalent to but faster than: 83 public static native void isoLatin1BytesToChars(byte[] bytes, int offset, int length, char[] chars); argument
|
/libcore/luni/src/test/java/libcore/java/util/zip/ |
H A D | DeflaterInputStreamTest.java | 57 public byte[] inflate(byte[] bytes) throws IOException { argument 58 try (InputStream in = new InflaterInputStream(new ByteArrayInputStream(bytes))) {
|
H A D | GZIPOutputStreamTest.java | 47 public static byte[] gzip(byte[] bytes) throws IOException { argument 50 gzippedOut.write(bytes);
|
H A D | ZipOutputStreamTest.java | 61 public static byte[] zip(String name, byte[] bytes) throws IOException { argument 67 zippedOut.write(bytes);
|
H A D | InflaterTest.java | 45 // Compress the bytes, using the passed-in dictionary (or no dictionary). 48 // Get ready to decompress deflatedBytes back to the original bytes ... 130 private static int adler32(byte[] bytes) { argument 132 adler32.update(bytes); 142 // Feed in bytes [0, 5) to the first iteration. 150 // Feed in bytes [5, 11) to the second iteration.
|
H A D | ZipInputStreamTest.java | 52 public static byte[] unzip(String name, byte[] bytes) throws IOException { argument 53 ZipInputStream in = new ZipInputStream(new ByteArrayInputStream(bytes)); 125 // contract for available states that we should return 1 if there are any bytes left to read 129 // There shouldn't be any bytes left to read if the entry is fully consumed... 146 private static byte[] zip(String[] names, byte[] bytes) throws IOException { argument 153 zippedOut.write(bytes);
|
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
H A D | SecureRandomSpiTest.java | 53 protected void engineNextBytes(byte[] bytes) {} argument
|
/libcore/luni/src/test/java/tests/security/interfaces/ |
H A D | Util.java | 99 protected void engineNextBytes(byte[] bytes) { argument 100 java.util.Arrays.fill(bytes, (byte) 0); 101 bytes[bytes.length - 1] = (byte) 10;
|
/libcore/ojluni/src/main/java/javax/net/ssl/ |
H A D | SNIServerName.java | 191 private static String toHexString(byte[] bytes) { argument 192 if (bytes.length == 0) { 196 StringBuilder sb = new StringBuilder(bytes.length * 3 - 1); 198 for (byte b : bytes) {
|
/libcore/ojluni/src/main/java/sun/net/ |
H A D | TelnetInputStream.java | 128 public int read(byte bytes[]) throws IOException { argument 129 return read(bytes, 0, bytes.length); 134 * bytes. 136 public int read(byte bytes[], int off, int length) throws IOException { argument 138 return super.read(bytes, off, length); 147 bytes[off++] = (byte)c;
|
H A D | TelnetOutputStream.java | 127 * Write the bytes at offset <i>off</i> in buffer <i>bytes</i> for 128 * <i>length</i> bytes. 130 public void write(byte bytes[], int off, int length) throws IOException { argument 132 super.write(bytes, off, length); 137 write(bytes[off++]);
|
/libcore/ojluni/src/main/java/sun/nio/fs/ |
H A D | Util.java | 53 * Encodes the given String into a sequence of bytes using the {@code Charset} 61 * Constructs a new String by decoding the specified array of bytes using the 64 static String toString(byte[] bytes) { argument 65 return new String(bytes, jnuEncoding);
|
/libcore/ojluni/src/main/java/sun/security/pkcs/ |
H A D | SigningCertificateInfo.java | 106 public void parse(byte[] bytes) throws IOException { argument 109 DerValue derValue = new DerValue(bytes);
|
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/ |
H A D | RandomImpl.java | 40 protected void engineNextBytes(byte[] bytes) { argument 42 for (int i = 0; i < bytes.length; i++) { 43 bytes[i] = (byte)(i + 0xF1);
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
H A D | ConsoleTest.java | 40 private static final byte[] bytes = "hello world\n".getBytes(); field in class:ConsoleTest 42 private InputStream in = new ByteArrayInputStream(bytes);
|
/libcore/luni/src/test/java/libcore/java/io/ |
H A D | DataOutputStreamTest.java | 28 private ByteArrayOutputStream bytes = new ByteArrayOutputStream(); field in class:DataOutputStreamTest 29 private DataOutputStream os = new DataOutputStream(bytes); 34 assertEquals("0100", HexEncoding.encodeToString(bytes.toByteArray())); 44 assertEquals("FF00018134", HexEncoding.encodeToString(bytes.toByteArray())); 50 assertEquals("303431", HexEncoding.encodeToString(bytes.toByteArray())); 57 assertEquals("00301234", HexEncoding.encodeToString(bytes.toByteArray())); 63 assertEquals("003012340031", HexEncoding.encodeToString(bytes.toByteArray())); 68 assertEquals("0123456789ABCDEF", HexEncoding.encodeToString(bytes.toByteArray())); 73 assertEquals("01234567", HexEncoding.encodeToString(bytes.toByteArray())); 78 assertEquals("01234567", HexEncoding.encodeToString(bytes [all...] |
/libcore/luni/src/test/java/libcore/util/ |
H A D | SerializationTester.java | 88 private static Object deserialize(byte[] bytes) throws IOException, ClassNotFoundException { argument 89 ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes));
|
/libcore/luni/src/test/java/tests/java/security/ |
H A D | SecureClassLoaderTest.java | 222 public Class define(String name, byte[] bytes) { argument 223 return defineClass(name, bytes, 0, bytes.length,
|
/libcore/ojluni/src/main/java/java/security/cert/ |
H A D | TrustAnchor.java | 272 private void setNameConstraints(byte[] bytes) { argument 273 if (bytes == null) { 277 ncBytes = bytes.clone(); 280 nc = new NameConstraintsExtension(Boolean.FALSE, bytes);
|
/libcore/ojluni/src/main/java/java/sql/ |
H A D | Blob.java | 50 * determining the position of a pattern of bytes within a 63 * Returns the number of bytes in the <code>BLOB</code> value 65 * @return length of the <code>BLOB</code> in bytes 77 * bytes. This <code>byte</code> array contains up to <code>length</code> 78 * consecutive bytes starting at position <code>pos</code>. 83 * @param length the number of consecutive bytes to be copied; the value 86 * consecutive bytes from the <code>BLOB</code> value designated 154 * Writes the given array of bytes to the <code>BLOB</code> value that 156 * <code>pos</code>, and returns the number of bytes written. 157 * The array of bytes wil 181 setBytes(long pos, byte[] bytes) argument 217 setBytes(long pos, byte[] bytes, int offset, int len) argument [all...] |
/libcore/ojluni/src/main/native/ |
H A D | FileInputStream.c | 91 static int available(int fd, jlong *bytes) { argument 102 *bytes = n; 109 *bytes = 0;
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
H A D | AbstractTCKTest.java | 122 byte[] bytes = baos.toByteArray(); 123 ByteArrayInputStream bais = new ByteArrayInputStream(bytes); 192 byte[] bytes = baos.toByteArray(); 194 try (ByteArrayInputStream bis = new ByteArrayInputStream(bytes); 207 * @param bytes and array of bytes 208 * @return a string containing the bytes formatted in java syntax 210 protected static String dumpSerialStream(byte[] bytes) { argument 211 StringBuilder sb = new StringBuilder(bytes.length * 5); 213 fmt.format(" byte[] bytes [all...] |
/libcore/luni/src/main/java/libcore/io/ |
H A D | IoUtils.java | 196 private byte[] bytes; field in class:IoUtils.FileReader 227 bytes = new byte[capacity]; 232 int capacity = bytes.length; 234 while ((read = Libcore.os.read(fd, bytes, count, capacity - count)) != 0) { 242 System.arraycopy(bytes, 0, newBytes, 0, capacity); 243 bytes = newBytes; 247 // of bytes from it, return. 263 if (count == bytes.length) { 264 return bytes; 267 System.arraycopy(bytes, [all...] |
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
H A D | FileChannelTest.java | 99 byte[] bytes = new byte[4]; 101 buffers[0].get(bytes); 102 assertEquals("abcd", new String(bytes, "US-ASCII")); 104 buffers[1].get(bytes); 105 assertEquals("ABCD", new String(bytes, "US-ASCII")); 281 private static FileChannel createFileContainingBytes(byte[] bytes) throws IOException { argument 285 fc.write(ByteBuffer.wrap(bytes)); 288 assertEquals(bytes.length, tmp.length()); 291 assertEquals(bytes.length, fc.size());
|