Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 57 for ByteArrayOutputStream (0.27 sec)

  1. src/main/java/org/codelibs/core/io/SerializeUtil.java

         * @return オブジェクトのbyte配列
         */
        public static byte[] fromObjectToBinary(final Object obj) {
            assertArgumentNotNull("obj", obj);
    
            try {
                final ByteArrayOutputStream baos = new ByteArrayOutputStream(BYTE_ARRAY_SIZE);
                final ObjectOutputStream oos = new ObjectOutputStream(baos);
                try {
                    oos.writeObject(obj);
                } finally {
                    oos.close();
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/io/CountingOutputStreamTest.java

    import static org.junit.Assert.assertThrows;
    
    import java.io.ByteArrayOutputStream;
    
    /**
     * Unit tests for {@link CountingOutputStream}.
     *
     * @author Chris Nokleberg
     */
    public class CountingOutputStreamTest extends IoTestCase {
    
      public void testCount() throws Exception {
        int written = 0;
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        CountingOutputStream counter = new CountingOutputStream(out);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/io/CountingOutputStreamTest.java

    import static org.junit.Assert.assertThrows;
    
    import java.io.ByteArrayOutputStream;
    
    /**
     * Unit tests for {@link CountingOutputStream}.
     *
     * @author Chris Nokleberg
     */
    public class CountingOutputStreamTest extends IoTestCase {
    
      public void testCount() throws Exception {
        int written = 0;
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        CountingOutputStream counter = new CountingOutputStream(out);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/io/ByteSourceTest.java

      public void testOpenBufferedStream() throws IOException {
        InputStream in = source.openBufferedStream();
        assertTrue(source.wasStreamOpened());
        assertFalse(source.wasStreamClosed());
    
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        ByteStreams.copy(in, out);
        in.close();
        out.close();
    
        assertTrue(source.wasStreamClosed());
        assertArrayEquals(bytes, out.toByteArray());
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.9K bytes
    - Viewed (0)
  5. build-logic/cleanup/src/main/java/gradlebuild/cleanup/services/KillLeakingJavaProcesses.java

            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
    
        private static ByteArrayOutputStream connectStream(InputStream forkedProcessOutput, CountDownLatch latch) {
            ByteArrayOutputStream os = new ByteArrayOutputStream();
            PrintStream ps = new PrintStream(os, true);
            new Thread(() -> {
                try {
    Java
    - Registered: Wed May 01 11:36:15 GMT 2024
    - Last Modified: Fri Apr 26 09:46:00 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/MultimapBuilderTest.java

        assertEquals(object.getClass(), copy.getClass());
      }
    
      @J2ktIncompatible
      @GwtIncompatible // serialization
      private static Object reserialize(Object object) throws Exception {
        ByteArrayOutputStream bytes = new ByteArrayOutputStream();
        new ObjectOutputStream(bytes).writeObject(object);
        return new ObjectInputStream(new ByteArrayInputStream(bytes.toByteArray())).readObject();
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 27 09:26:07 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/io/FilesTest.java

        assertEquals(I18N + I18N + I18N, Files.toString(temp, Charsets.UTF_16LE));
      }
    
      public void testCopyToOutputStream() throws IOException {
        File i18nFile = getTestFile("i18n.txt");
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        Files.copy(i18nFile, out);
        assertEquals(I18N, out.toString("UTF-8"));
      }
    
      public void testCopyToAppendable() throws IOException {
        File i18nFile = getTestFile("i18n.txt");
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 22.2K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/io/ByteSourceTest.java

      public void testOpenBufferedStream() throws IOException {
        InputStream in = source.openBufferedStream();
        assertTrue(source.wasStreamOpened());
        assertFalse(source.wasStreamClosed());
    
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        ByteStreams.copy(in, out);
        in.close();
        out.close();
    
        assertTrue(source.wasStreamClosed());
        assertArrayEquals(bytes, out.toByteArray());
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.9K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/fess/app/web/api/admin/backup/ApiAdminBackupAction.java

                if ("system.properties".equals(id)) {
                    return asStream(id).contentTypeOctetStream().stream(out -> {
                        try (final ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
                            ComponentUtil.getSystemProperties().store(baos, id);
                            try (final InputStream in = new ByteArrayInputStream(baos.toByteArray())) {
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  10. src/main/java/jcifs/spnego/NegTokenInit.java

                ASN1EncodableVector ev = new ASN1EncodableVector();
                ev.add(SPNEGO_OID);
                ev.add(new DERTaggedObject(true, 0, new DERSequence(fields)));
                ByteArrayOutputStream collector = new ByteArrayOutputStream();
                ASN1OutputStream der = ASN1OutputStream.create(collector, ASN1Encoding.DER);
    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)
Back to top