Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for toByteArray (0.18 sec)

  1. 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)
  2. android/guava-tests/test/com/google/common/primitives/ShortsTest.java

            .isEqualTo(new short[] {(short) 1, (short) 2, (short) 3, (short) 4});
      }
    
      @GwtIncompatible // Shorts.toByteArray
      public void testToByteArray() {
        assertThat(Shorts.toByteArray((short) 0x2345)).isEqualTo(new byte[] {0x23, 0x45});
        assertThat(Shorts.toByteArray((short) 0xFEDC)).isEqualTo(new byte[] {(byte) 0xFE, (byte) 0xDC});
      }
    
      @GwtIncompatible // Shorts.fromByteArray
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 29 15:43:06 GMT 2024
    - 26.6K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/primitives/ShortsTest.java

            .isEqualTo(new short[] {(short) 1, (short) 2, (short) 3, (short) 4});
      }
    
      @GwtIncompatible // Shorts.toByteArray
      public void testToByteArray() {
        assertThat(Shorts.toByteArray((short) 0x2345)).isEqualTo(new byte[] {0x23, 0x45});
        assertThat(Shorts.toByteArray((short) 0xFEDC)).isEqualTo(new byte[] {(byte) 0xFE, (byte) 0xDC});
      }
    
      @GwtIncompatible // Shorts.fromByteArray
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 29 15:43:06 GMT 2024
    - 26.6K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

          length: Int,
        ) {
          check(type == -1)
          this.type = Http2.TYPE_DATA
          this.inFinished = inFinished
          this.streamId = streamId
          this.data = source.readByteString(length.toLong()).toByteArray()
        }
    
        override fun rstStream(
          streamId: Int,
          errorCode: ErrorCode,
        ) {
          check(type == -1)
          this.type = Http2.TYPE_RST_STREAM
          this.streamId = streamId
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/fess/timer/MonitorTarget.java

                exception.printStackTrace(writer);
                writer.flush();
                append(buf, "exception", () -> StringEscapeUtils.escapeJson(new String(baos.toByteArray(), Constants.CHARSET_UTF_8)));
            } catch (final IOException e) {
                append(buf, "exception", () -> StringEscapeUtils.escapeJson(e.getMessage()));
            }
            return buf;
        }
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 3K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt

        assertThat(data1.type).isEqualTo(Http2.TYPE_DATA)
        assertThat(data1.streamId).isEqualTo(3)
        assertArrayEquals("abcde".toByteArray(), data1.data)
        val data2 = peer.takeFrame()
        assertThat(data2.type).isEqualTo(Http2.TYPE_DATA)
        assertThat(data2.streamId).isEqualTo(3)
        assertArrayEquals("fghi".toByteArray(), data2.data)
      }
    
      /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 75.4K bytes
    - Viewed (0)
  7. src/main/java/org/codelibs/core/io/SerializeUtil.java

                final ObjectOutputStream oos = new ObjectOutputStream(baos);
                try {
                    oos.writeObject(obj);
                } finally {
                    oos.close();
                }
                return baos.toByteArray();
            } catch (final IOException ex) {
                throw new IORuntimeException(ex);
            }
        }
    
        /**
         * {@literal byte}の配列をオブジェクトに変換します。
         *
         * @param bytes
    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)
  8. guava-tests/test/com/google/common/primitives/LongsTest.java

            new byte[] {0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19},
            Longs.toByteArray(0x1213141516171819L));
        assertByteArrayEquals(
            new byte[] {
              (byte) 0xFF, (byte) 0xEE, (byte) 0xDD, (byte) 0xCC,
              (byte) 0xBB, (byte) 0xAA, (byte) 0x99, (byte) 0x88
            },
            Longs.toByteArray(0xFFEEDDCCBBAA9988L));
      }
    
      public void testFromByteArray() {
        assertThat(
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 30K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/primitives/LongsTest.java

            new byte[] {0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19},
            Longs.toByteArray(0x1213141516171819L));
        assertByteArrayEquals(
            new byte[] {
              (byte) 0xFF, (byte) 0xEE, (byte) 0xDD, (byte) 0xCC,
              (byte) 0xBB, (byte) 0xAA, (byte) 0x99, (byte) 0x88
            },
            Longs.toByteArray(0xFFEEDDCCBBAA9988L));
      }
    
      public void testFromByteArray() {
        assertThat(
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 30K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/fess/app/web/api/admin/backup/ApiAdminBackupAction.java

                            ComponentUtil.getSystemProperties().store(baos, id);
                            try (final InputStream in = new ByteArrayInputStream(baos.toByteArray())) {
                                out.write(in);
                            }
                        }
                    });
                }
                if (!id.endsWith(NDJSON_EXTENTION)) {
    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)
Back to top