Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 80 for ByteArrayOutputStream (0.23 sec)

  1. android/guava/src/com/google/common/io/ByteStreams.java

      public static ByteArrayDataOutput newDataOutput(ByteArrayOutputStream byteArrayOutputStream) {
        return new ByteArrayDataOutputStream(checkNotNull(byteArrayOutputStream));
      }
    
      private static class ByteArrayDataOutputStream implements ByteArrayDataOutput {
    
        final DataOutput output;
        final ByteArrayOutputStream byteArrayOutputStream;
    
        ByteArrayDataOutputStream(ByteArrayOutputStream byteArrayOutputStream) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jan 17 18:59:58 GMT 2024
    - 29.7K bytes
    - Viewed (0)
  2. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/io/TestByteSink.java

    import com.google.common.collect.ImmutableSet;
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.OutputStream;
    
    /**
     * A byte sink for testing that has configurable behavior.
     *
     * @author Colin Decker
     */
    public class TestByteSink extends ByteSink implements TestStreamSupplier {
    
      private final ByteArrayOutputStream bytes = new ByteArrayOutputStream();
      private final ImmutableSet<TestOption> options;
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Sep 15 13:47:32 GMT 2016
    - 1.8K bytes
    - Viewed (0)
  4. 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 Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 27 09:26:07 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  5. 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 May 05 00:10:10 GMT 2024
    - Last Modified: Sun Jul 01 13:12:10 GMT 2018
    - 3.3K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/io/ResourcesTest.java

        assertEquals("ALICE'S ADVENTURES IN WONDERLAND", result.get(0));
        assertEquals("THE END", result.get(result.size() - 1));
      }
    
      public void testCopyToOutputStream() throws IOException {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        URL resource = getClass().getResource("testdata/i18n.txt");
        Resources.copy(resource, out);
        assertEquals(I18N, out.toString("UTF-8"));
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.8K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/io/LittleEndianDataOutputStreamTest.java

    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.DataInput;
    import java.io.DataInputStream;
    import java.io.IOException;
    import junit.framework.TestCase;
    
    /**
     * Test class for {@link LittleEndianDataOutputStream}.
     *
     * @author Keith Bottner
     */
    public class LittleEndianDataOutputStreamTest extends TestCase {
    
      private ByteArrayOutputStream baos = new ByteArrayOutputStream();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.7K bytes
    - Viewed (0)
  8. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top