Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 32 for toByteArray (0.2 sec)

  1. guava-tests/test/com/google/common/io/ByteSourceTester.java

        try {
          byte[] readBytes = ByteStreams.toByteArray(in);
          assertExpectedBytes(readBytes);
        } finally {
          in.close();
        }
      }
    
      public void testOpenBufferedStream() throws IOException {
        InputStream in = source.openBufferedStream();
        try {
          byte[] readBytes = ByteStreams.toByteArray(in);
          assertExpectedBytes(readBytes);
        } finally {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 8.6K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/io/ByteSourceTester.java

        try {
          byte[] readBytes = ByteStreams.toByteArray(in);
          assertExpectedBytes(readBytes);
        } finally {
          in.close();
        }
      }
    
      public void testOpenBufferedStream() throws IOException {
        InputStream in = source.openBufferedStream();
        try {
          byte[] readBytes = ByteStreams.toByteArray(in);
          assertExpectedBytes(readBytes);
        } finally {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 8.6K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/io/LittleEndianDataInputStreamTest.java

        super.setUp();
    
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        DataOutputStream out = new DataOutputStream(baos);
    
        initializeData(out);
    
        data = baos.toByteArray();
      }
    
      private void initializeData(DataOutputStream out) throws IOException {
        /* Write out various test values NORMALLY */
        out.write(new byte[] {-100, 100});
        out.writeBoolean(true);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/io/LittleEndianDataInputStreamTest.java

        super.setUp();
    
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        DataOutputStream out = new DataOutputStream(baos);
    
        initializeData(out);
    
        data = baos.toByteArray();
      }
    
      private void initializeData(DataOutputStream out) throws IOException {
        /* Write out various test values NORMALLY */
        out.write(new byte[] {-100, 100});
        out.writeBoolean(true);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  5. src/test/java/org/codelibs/core/io/CopyUtilTest.java

        /**
         * @throws Exception
         */
        @Test
        public void testIsToOs() throws Exception {
            final int result = copy(is, os);
            assertThat(result, is(srcBytes.length));
            assertThat(os.toByteArray(), is(srcBytes));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testReaderToWriter() throws Exception {
            final int result = copy(reader, writer);
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java

          super(chunkSize);
          this.chunkSize = chunkSize;
          this.bufferSize = chunkSize;
        }
    
        @Override
        protected HashCode makeHash() {
          return HashCode.fromBytes(out.toByteArray());
        }
    
        @Override
        protected void process(ByteBuffer bb) {
          processCalled++;
          assertEquals(ByteOrder.LITTLE_ENDIAN, bb.order());
          assertTrue(bb.remaining() >= chunkSize);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 8.5K bytes
    - Viewed (0)
  7. src/main/java/jcifs/spnego/NegTokenInit.java

            }
            return String.format("NegTokenInit[flags=%d,mechs=%s,mic=%s]", this.getContextFlags(), Arrays.toString(this.getMechanisms()), mic);
        }
    
    
        @Override
        public byte[] toByteArray () {
            try {
                ASN1EncodableVector fields = new ASN1EncodableVector();
                ASN1ObjectIdentifier[] mechs = getMechanisms();
                if ( mechs != null ) {
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Sun Oct 01 12:01:17 GMT 2023
    - 7.9K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java

          super(chunkSize);
          this.chunkSize = chunkSize;
          this.bufferSize = chunkSize;
        }
    
        @Override
        protected HashCode makeHash() {
          return HashCode.fromBytes(out.toByteArray());
        }
    
        @Override
        protected void process(ByteBuffer bb) {
          processCalled++;
          assertEquals(ByteOrder.LITTLE_ENDIAN, bb.order());
          assertTrue(bb.remaining() >= chunkSize);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 8.5K bytes
    - Viewed (0)
  9. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Certificate.kt

        return Signature.getInstance(tbsCertificate.signatureAlgorithmName).run {
          initVerify(issuer)
          update(signedData.toByteArray())
          verify(signatureValue.byteString.toByteArray())
        }
      }
    
      fun toX509Certificate(): X509Certificate {
        val data = CertificateAdapters.certificate.toDer(this)
        try {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/testing/Platform.java

        try {
          ObjectOutputStream out = new ObjectOutputStream(bytes);
          out.writeObject(object);
          ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes.toByteArray()));
          return (T) requireNonNull(in.readObject());
        } catch (IOException | ClassNotFoundException e) {
          throw new RuntimeException(e);
        }
      }
    
      private Platform() {}
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Aug 23 12:13:11 GMT 2023
    - 1.7K bytes
    - Viewed (0)
Back to top