- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 111 for toByteArray (0.09 sec)
-
guava-tests/test/com/google/common/io/ResourcesTest.java
assertThat(Resources.toString(resource, US_ASCII)).isNotEqualTo(I18N); } public void testToByteArray() throws IOException { URL resource = getClass().getResource("testdata/i18n.txt"); assertThat(Resources.toByteArray(resource)).isEqualTo(I18N.getBytes(UTF_8)); } public void testReadLines() throws IOException { // TODO(chrisn): Check in a better resource URL resource = getClass().getResource("testdata/i18n.txt");
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 6.8K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt
) val startNanos = System.nanoTime() val connection = server.url("/").toUrl().openConnection() connection.setDoOutput(true) connection.getOutputStream().write("ABCDEF".toByteArray(StandardCharsets.UTF_8)) val inputStream = connection.getInputStream() assertThat(inputStream.read()).isEqualTo(-1) val elapsedNanos = System.nanoTime() - startNanos
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 21.9K bytes - Viewed (0) -
okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerCertificatesTest.kt
) val keyFactory = KeyFactory.getInstance("RSA") val publicKey = keyFactory.generatePublic(X509EncodedKeySpec(x509PublicKey.toByteArray())) val privateKey = keyFactory.generatePrivate(PKCS8EncodedKeySpec(privateKeyBytes.toByteArray())) val certificate = HeldCertificate.Builder() .keyPair(publicKey, privateKey) .build()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 43.9K bytes - Viewed (0) -
guava/src/com/google/common/primitives/Bytes.java
*/ public static byte[] toArray(Collection<? extends Number> collection) { if (collection instanceof ByteArrayAsList) { return ((ByteArrayAsList) collection).toByteArray(); } Object[] boxedArray = collection.toArray(); int len = boxedArray.length; byte[] array = new byte[len]; for (int i = 0; i < len; i++) { // checkNotNull for GWT (do not optimize)
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Aug 27 16:47:48 UTC 2024 - 15.3K bytes - Viewed (0) -
android/guava/src/com/google/common/io/Files.java
} @Override public byte[] read() throws IOException { Closer closer = Closer.create(); try { FileInputStream in = closer.register(openStream()); return ByteStreams.toByteArray(in, in.getChannel().size()); } catch (Throwable e) { throw closer.rethrow(e); } finally { closer.close(); } } @Override public String toString() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Jul 22 19:03:12 UTC 2024 - 33.1K bytes - Viewed (0) -
src/main/java/jcifs/http/NtlmHttpURLConnection.java
int attempt = 0; while ( attempt < MAX_REDIRECTS ) { this.connection.setRequestProperty(this.authProperty, this.authMethod + ' ' + Base64.toBase64String(type1.toByteArray())); this.connection.connect(); // send type 1 response = parseResponseCode(); if ( response != HTTP_UNAUTHORIZED && response != HTTP_PROXY_AUTH ) {
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Sun Jul 01 13:12:10 UTC 2018 - 25.5K bytes - Viewed (0) -
compat/maven-repository-metadata/src/test/java/org/apache/maven/artifact/repository/metadata/MetadataTest.java
new MetadataStaxWriter().write(baos, source.getDelegate()); Metadata source2 = new Metadata(new MetadataStaxReader().read(new ByteArrayInputStream(baos.toByteArray()), true)); assertNotNull(source2); } /*-- START helper methods to populate metadata objects ---*/ private static final String SNAPSHOT = "SNAPSHOT";
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 13.7K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/RequestBody.kt
*/ @JvmStatic @JvmName("create") fun String.toRequestBody(contentType: MediaType? = null): RequestBody { val (charset, finalContentType) = contentType.chooseCharset() val bytes = toByteArray(charset) return bytes.toRequestBody(finalContentType, 0, bytes.size) } @JvmStatic @JvmName("create")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Jan 25 14:41:37 UTC 2024 - 9.6K bytes - Viewed (0) -
guava/src/com/google/common/net/InetAddresses.java
// illegal value is 255.255.255.255. if (coercedHash == 0xffffffff) { coercedHash = 0xfffffffe; } return getInet4Address(Ints.toByteArray(coercedHash)); } /** * Returns an integer representing an IPv4 address regardless of whether the supplied argument is * an IPv4 address or not. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 47.1K bytes - Viewed (0) -
src/main/java/jcifs/ntlmssp/Type2Message.java
* @param context * The local security context. */ public void setContext ( byte[] context ) { this.context = context; } @Override public byte[] toByteArray () throws IOException { int size = 48; int flags = getFlags(); String targetName = getTarget(); byte[] targetInformationBytes = getTargetInformation();
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Sun Jul 01 13:12:10 UTC 2018 - 14.4K bytes - Viewed (0)