Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 80 for ByteArrayOutputStream (0.27 sec)

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

      }
    
      public void testCopyTo_outputStream() throws IOException {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        source.copyTo(out);
        assertExpectedBytes(out.toByteArray());
      }
    
      public void testCopyTo_byteSink() throws IOException {
        final ByteArrayOutputStream out = new ByteArrayOutputStream();
        // HERESY! but it's ok just for this I guess
        source.copyTo(
    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. maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/ThreadOutputMuxer.java

        private final Map<ProjectSegment, ByteArrayOutputStream> streams = new HashMap<>();
    
        private final Map<ProjectSegment, PrintStream> printStreams = new HashMap<>();
    
        private final ByteArrayOutputStream defaultOutputStreamForUnknownData = new ByteArrayOutputStream();
    
        private final PrintStream defaultPrintStream = new PrintStream(defaultOutputStreamForUnknownData);
    
    Java
    - Registered: Sun Apr 21 03:35:09 GMT 2024
    - Last Modified: Wed Sep 06 08:39:32 GMT 2023
    - 12.8K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/ReserializingTestCollectionGenerator.java

        return reserialize(delegate.create(elements));
      }
    
      @SuppressWarnings("unchecked")
      static <T> T reserialize(T object) {
        try {
          ByteArrayOutputStream bytes = new ByteArrayOutputStream();
          ObjectOutputStream out = new ObjectOutputStream(bytes);
          out.writeObject(object);
          ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes.toByteArray()));
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Oct 01 17:18:04 GMT 2021
    - 2.5K bytes
    - Viewed (0)
  4. guava-testlib/src/com/google/common/collect/testing/ReserializingTestCollectionGenerator.java

        return reserialize(delegate.create(elements));
      }
    
      @SuppressWarnings("unchecked")
      static <T> T reserialize(T object) {
        try {
          ByteArrayOutputStream bytes = new ByteArrayOutputStream();
          ObjectOutputStream out = new ObjectOutputStream(bytes);
          out.writeObject(object);
          ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes.toByteArray()));
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Oct 01 17:18:04 GMT 2021
    - 2.5K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/testing/Platform.java

    final class Platform {
      /** Serializes and deserializes the specified object. */
      @SuppressWarnings("unchecked")
      static <T> T reserialize(T object) {
        checkNotNull(object);
        ByteArrayOutputStream bytes = new ByteArrayOutputStream();
        try {
          ObjectOutputStream out = new ObjectOutputStream(bytes);
          out.writeObject(object);
          ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes.toByteArray()));
    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)
  6. android/guava-testlib/src/com/google/common/testing/Platform.java

    final class Platform {
      /** Serializes and deserializes the specified object. */
      @SuppressWarnings("unchecked")
      static <T> T reserialize(T object) {
        checkNotNull(object);
        ByteArrayOutputStream bytes = new ByteArrayOutputStream();
        try {
          ObjectOutputStream out = new ObjectOutputStream(bytes);
          out.writeObject(object);
          ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes.toByteArray()));
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Aug 23 12:13:11 GMT 2023
    - 1.7K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/io/ByteStreamsTest.java

     *
     * @author Chris Nokleberg
     */
    public class ByteStreamsTest extends IoTestCase {
    
      public void testCopyChannel() throws IOException {
        byte[] expected = newPreFilledByteArray(100);
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        WritableByteChannel outChannel = Channels.newChannel(out);
    
        ReadableByteChannel inChannel = Channels.newChannel(new ByteArrayInputStream(expected));
        ByteStreams.copy(inChannel, outChannel);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java

        assertThrows(IndexOutOfBoundsException.class, () -> hasher.putBytes(new byte[8], 0, -1));
      }
    
      private class TestHasher extends AbstractByteHasher {
    
        private final ByteArrayOutputStream out = new ByteArrayOutputStream();
    
        @Override
        protected void update(byte b) {
          out.write(b);
        }
    
        @Override
        protected void update(byte[] b, int off, int len) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  9. src/main/java/jcifs/internal/smb1/com/SmbComNegotiate.java

            return 0;
        }
    
    
        @Override
        protected int writeBytesWireFormat ( byte[] dst, int dstIndex ) {
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
    
            for ( String dialect : this.dialects ) {
                bos.write(0x02);
                try {
                    bos.write(Strings.getASCIIBytes(dialect));
                }
    Java
    - Registered: Sun Apr 21 00:10:10 GMT 2024
    - Last Modified: Sun Jul 01 13:12:10 GMT 2018
    - 3.3K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/curl/CurlResponse.java

        }
    
        public String getContentAsString() {
            final byte[] bytes = new byte[4096];
            try (BufferedInputStream bis = new BufferedInputStream(getContentAsStream());
                    ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
                int length = bis.read(bytes);
                while (length != -1) {
                    if (length != 0) {
                        baos.write(bytes, 0, length);
                    }
    Java
    - Registered: Thu Apr 25 15:34:08 GMT 2024
    - Last Modified: Mon Nov 14 21:05:19 GMT 2022
    - 4K bytes
    - Viewed (0)
Back to top