Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 28 for byte (0.18 sec)

  1. src/main/java/org/codelibs/core/convert/NumberConversionUtil.java

                    return b;
                }
                return Boolean.FALSE;
            } else if (type == byte.class) {
                final Byte b = ByteConversionUtil.toByte(o);
                if (b != null) {
                    return b;
                }
                return Byte.valueOf((byte) 0);
            }
            return o;
        }
    
        /**
         * デリミタを削除します。
         *
         * @param value
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/core/convert/ByteConversionUtil.java

    /**
     * {@link Byte}用の変換ユーティリティです。
     *
     * @author higa
     */
    public abstract class ByteConversionUtil {
    
        /**
         * {@link Byte}に変換します。
         *
         * @param o
         *            変換元のオブジェクト
         * @return 変換された{@link Byte}
         */
        public static Byte toByte(final Object o) {
            return toByte(o, null);
        }
    
        /**
         * {@link Byte}に変換します。
         *
         * @param o
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/core/crypto/CachedCipher.java

        protected Queue<Cipher> encryptoQueue = new ConcurrentLinkedQueue<>();
    
        protected Queue<Cipher> decryptoQueue = new ConcurrentLinkedQueue<>();
    
        public byte[] encrypto(final byte[] data) {
            final Cipher cipher = pollEncryptoCipher();
            byte[] encrypted;
            try {
                encrypted = cipher.doFinal(data);
            } catch (final IllegalBlockSizeException e) {
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  4. src/test/java/org/codelibs/core/convert/NumberConversionUtilTest.java

         */
        public void testConvertNumber_byte() throws Exception {
            assertEquals(new Byte("1"), NumberConversionUtil.convertNumber(Byte.class, "1"));
        }
    
        /**
         * @throws Exception
         */
        public void testConvertNumber_primitiveWrapper() throws Exception {
            assertEquals(new Byte("1"), NumberConversionUtil.convertPrimitiveWrapper(byte.class, "1"));
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/core/misc/Base64Util.java

            final byte b0 = DECODE_TABLE[inData.charAt(inIndex)];
            final byte b1 = DECODE_TABLE[inData.charAt(inIndex + 1)];
            final byte b2 = DECODE_TABLE[inData.charAt(inIndex + 2)];
            final byte b3 = DECODE_TABLE[inData.charAt(inIndex + 3)];
            outData[outIndex] = (byte) (b0 << 2 & 0xfc | b1 >> 4 & 0x3);
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  6. src/test/java/org/codelibs/core/convert/ByteConversionUtilTest.java

    /**
     * @author higa
     *
     */
    public class ByteConversionUtilTest extends TestCase {
    
        /**
         * @throws Exception
         */
        public void testToByte() throws Exception {
            assertEquals(new Byte("100"), ByteConversionUtil.toByte("100"));
        }
    
        /**
         * @throws Exception
         */
        public void testToPrimitiveByte() throws Exception {
            assertEquals(100, ByteConversionUtil.toPrimitiveByte("100"));
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  7. src/main/java/org/codelibs/core/convert/StringConversionUtil.java

                return toString((java.util.Date) value, pattern);
            } else if (value instanceof Number) {
                return toString((Number) value, pattern);
            } else if (value instanceof byte[]) {
                return Base64Util.encode((byte[]) value);
            } else {
                return value.toString();
            }
        }
    
        /**
         * 文字列に変換します。
         *
         * @param value
         *            変換元のオブジェクト
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 6.5K bytes
    - Viewed (0)
  8. src/test/java/org/codelibs/core/convert/BinaryConversionUtilTest.java

         * .
         */
        @Test
        public void testToBinary() {
            assertThat(BinaryConversionUtil.toBinary(null), nullValue());
            final byte[] b = { 0x00, 0x01 };
            assertThat(BinaryConversionUtil.toBinary(b), is(b));
            assertThat(BinaryConversionUtil.toBinary("hoge"), is("hoge".getBytes()));
        }
    
        /**
         * Test method for
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 2K bytes
    - Viewed (0)
  9. src/test/java/org/codelibs/core/misc/Base64UtilTest.java

        private static final byte[] BINARY_DATA = ORIGINAL.getBytes();
    
        private static final String ENCODED_DATA = "aG93IG5vdyBicm93biBjb3cNCg==";
    
        /**
         * @throws Exception
         */
        public void testEncode() throws Exception {
            assertEquals("1", ENCODED_DATA, Base64Util.encode(BINARY_DATA));
            System.out.println(Base64Util.encode(new byte[] { 'a', 'b', 'c' }));
        }
    
        /**
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/core/io/SerializeUtil.java

        }
    
        /**
         * {@literal byte}の配列をオブジェクトに変換します。
         *
         * @param bytes
         *            デシリアライズする配列。{@literal null}や空配列であってはいけません
         * @return 復元したオブジェクト
         */
        public static Object fromBinaryToObject(final byte[] bytes) {
            assertArgumentNotEmpty("bytes", bytes);
    
            try {
                final ByteArrayInputStream bais = new ByteArrayInputStream(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)
Back to top