Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 111 for toByteArray (0.11 sec)

  1. okhttp/src/test/java/okhttp3/internal/tls/HostnameVerifierTest.kt

      }
    
      private fun certificate(certificate: String): X509Certificate {
        return CertificateFactory.getInstance("X.509")
          .generateCertificate(ByteArrayInputStream(certificate.toByteArray()))
          as X509Certificate
      }
    
      private fun session(certificate: String): SSLSession = FakeSSLSession(certificate(certificate))
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 40.3K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/primitives/Ints.java

       * use a shared {@link java.nio.ByteBuffer} instance, or use {@link
       * com.google.common.io.ByteStreams#newDataOutput()} to get a growable buffer.
       */
      public static byte[] toByteArray(int value) {
        return new byte[] {
          (byte) (value >> 24), (byte) (value >> 16), (byte) (value >> 8), (byte) value
        };
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 31K bytes
    - Viewed (0)
  3. src/main/java/jcifs/smb1/smb1/SID.java

                    if (policyHandle != null) {
                        policyHandle.close();
                    }
                    handle.close();
                }
            }
    }
        }
        public static byte[] toByteArray(rpc.sid_t sid) {
            byte[] dst = new byte[1 + 1 + 6 + sid.sub_authority_count * 4];
            int di = 0;
            dst[di++] = sid.revision;
            dst[di++] = sid.sub_authority_count;
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Fri Mar 22 21:10:40 UTC 2019
    - 26.6K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

          ObjectOutputStream oos = new ObjectOutputStream(bos);
          oos.writeObject(o);
          oos.flush();
          oos.close();
          ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray()));
          T clone = (T) ois.readObject();
          assertSame(o.getClass(), clone.getClass());
          return clone;
        } catch (Throwable t) {
          threadUnexpectedException(t);
          return null;
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 37.9K bytes
    - Viewed (0)
  5. guava/src/com/google/common/primitives/Chars.java

       * use a shared {@link java.nio.ByteBuffer} instance, or use {@link
       * com.google.common.io.ByteStreams#newDataOutput()} to get a growable buffer.
       */
      @GwtIncompatible // doesn't work
      public static byte[] toByteArray(char value) {
        return new byte[] {(byte) (value >> 8), (byte) value};
      }
    
      /**
       * Returns the {@code char} value whose big-endian representation is stored in the first 2 bytes
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Aug 27 16:47:48 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/primitives/Longs.java

       * use a shared {@link java.nio.ByteBuffer} instance, or use {@link
       * com.google.common.io.ByteStreams#newDataOutput()} to get a growable buffer.
       */
      public static byte[] toByteArray(long value) {
        // Note that this code needs to stay compatible with GWT, which has known
        // bugs when narrowing byte casts of long values occur.
        byte[] result = new byte[8];
        for (int i = 7; i >= 0; i--) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 29.3K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

          ObjectOutputStream oos = new ObjectOutputStream(bos);
          oos.writeObject(o);
          oos.flush();
          oos.close();
          ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray()));
          T clone = (T) ois.readObject();
          assertSame(o.getClass(), clone.getClass());
          return clone;
        } catch (Throwable t) {
          threadUnexpectedException(t);
          return null;
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 37.9K bytes
    - Viewed (0)
  8. guava/src/com/google/common/primitives/Longs.java

       * use a shared {@link java.nio.ByteBuffer} instance, or use {@link
       * com.google.common.io.ByteStreams#newDataOutput()} to get a growable buffer.
       */
      public static byte[] toByteArray(long value) {
        // Note that this code needs to stay compatible with GWT, which has known
        // bugs when narrowing byte casts of long values occur.
        byte[] result = new byte[8];
        for (int i = 7; i >= 0; i--) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 15:52:18 UTC 2024
    - 29K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/MoreFiles.java

          return attrs.size();
        }
    
        @Override
        public byte[] read() throws IOException {
          try (SeekableByteChannel channel = Files.newByteChannel(path, options)) {
            return ByteStreams.toByteArray(Channels.newInputStream(channel), channel.size());
          }
        }
    
        @Override
        public CharSource asCharSource(Charset charset) {
          if (options.length == 0) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 16:07:00 UTC 2024
    - 35K bytes
    - Viewed (0)
  10. guava/src/com/google/common/io/MoreFiles.java

          return attrs.size();
        }
    
        @Override
        public byte[] read() throws IOException {
          try (SeekableByteChannel channel = Files.newByteChannel(path, options)) {
            return ByteStreams.toByteArray(Channels.newInputStream(channel), channel.size());
          }
        }
    
        @Override
        public CharSource asCharSource(Charset charset) {
          if (options.length == 0) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 16:07:00 UTC 2024
    - 34.5K bytes
    - Viewed (0)
Back to top