Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 36 for ByteArrayOutputStream (0.14 sec)

  1. src/test/java/jcifs/pac/PacSignatureTest.java

         * @throws PACDecodingException if the PAC is malformed
         */
        @Test
        void testConstructorKerbChecksumHmacMd5() throws IOException, PACDecodingException {
            // Prepare data
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            writeLittleEndianInt(baos, PacSignature.KERB_CHECKSUM_HMAC_MD5);
            byte[] checksum = new byte[16];
            for (int i = 0; i < checksum.length; i++) {
                checksum[i] = (byte) i;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.3K bytes
    - Viewed (0)
  2. src/test/java/jcifs/pac/PacTest.java

        }
    
        private void writeLittleEndianInt(ByteArrayOutputStream baos, int value) {
            baos.write(value & 0xFF);
            baos.write((value >> 8) & 0xFF);
            baos.write((value >> 16) & 0xFF);
            baos.write((value >> 24) & 0xFF);
        }
    
        private void writeLittleEndianLong(ByteArrayOutputStream baos, long value) {
            for (int i = 0; i < 8; i++) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  3. src/test/java/org/codelibs/fess/dict/DictionaryExpiredExceptionTest.java

            DictionaryExpiredException exception = new DictionaryExpiredException();
    
            try {
                // Redirect to ByteArrayOutputStream to avoid console output
                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                java.io.PrintStream ps = new java.io.PrintStream(baos);
                exception.printStackTrace(ps);
    
                String output = baos.toString();
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 7.2K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/testing/Platform.java

    @NullMarked
    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()));
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  5. src/test/java/jcifs/pac/kerberos/KerberosTokenTest.java

        private byte[] createGssApiWrapper(ASN1ObjectIdentifier oid, byte[] data) throws IOException {
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
    
            // Build the inner content
            ByteArrayOutputStream innerContent = new ByteArrayOutputStream();
            innerContent.write(oid.getEncoded());
            innerContent.write(data);
    
            byte[] content = innerContent.toByteArray();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.8K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/io/TestByteSink.java

    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.OutputStream;
    import org.jspecify.annotations.NullUnmarked;
    
    /**
     * A byte sink for testing that has configurable behavior.
     *
     * @author Colin Decker
     */
    @NullUnmarked
    public class TestByteSink extends ByteSink implements TestStreamSupplier {
    
      private final ByteArrayOutputStream bytes = new ByteArrayOutputStream();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 1.9K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb1/util/LogStreamTest.java

        }
    
        @Test
        void testPrintStreamDelegation() {
            // Test that LogStream properly delegates to underlying PrintStream
            // Use a real PrintStream with ByteArrayOutputStream to test delegation
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            PrintStream realStream = new PrintStream(baos);
            LogStream logStream = new LogStream(realStream);
    
            // Test delegation of various methods
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.3K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/fess/timer/MonitorTarget.java

         * @param exception the exception to append
         * @return the updated buffer
         */
        protected StringBuilder appendException(final StringBuilder buf, final Exception exception) {
            try (ByteArrayOutputStream baos = new ByteArrayOutputStream();
                    PrintWriter writer = new PrintWriter(baos, false, Constants.CHARSET_UTF_8)) {
                exception.printStackTrace(writer);
                writer.flush();
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Jul 17 08:28:31 UTC 2025
    - 3.8K bytes
    - Viewed (0)
  9. src/test/java/jcifs/spnego/SpnegoExceptionTest.java

            // Given
            SpnegoException original = new SpnegoException("serialize me", new IllegalArgumentException("iaex"));
    
            // When
            byte[] bytes;
            try (ByteArrayOutputStream bout = new ByteArrayOutputStream(); ObjectOutputStream oout = new ObjectOutputStream(bout)) {
                oout.writeObject(original);
                oout.flush();
                bytes = bout.toByteArray();
            }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/hash/HashingOutputStreamTest.java

      private Hasher hasher;
      private HashFunction hashFunction;
      private final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
    
      @SuppressWarnings("DoNotMock")
      @Override
      protected void setUp() throws Exception {
        super.setUp();
        hasher = mock(Hasher.class);
        hashFunction = mock(HashFunction.class);
    
        when(hashFunction.newHasher()).thenReturn(hasher);
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 3.1K bytes
    - Viewed (0)
Back to top