- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for SetBytes (0.18 sec)
-
src/test/java/org/codelibs/core/io/InputStreamUtilTest.java
final InputStream is = ResourceUtil.getResourceAsStream(StringUtil.replace(getClass().getName(), ".", "/") + ".class"); try { assertNotNull("1", InputStreamUtil.getBytes(is)); } finally { is.close(); } }
Java - Registered: Fri Apr 26 20:58:09 GMT 2024 - Last Modified: Thu Mar 07 01:59:08 GMT 2024 - 1.2K bytes - Viewed (0) -
src/test/java/org/codelibs/core/convert/BinaryConversionUtilTest.java
final byte[] b = { 0x00, 0x01 }; assertThat(BinaryConversionUtil.toBinary(b), is(b)); assertThat(BinaryConversionUtil.toBinary("hoge"), is("hoge".getBytes())); } /** * Test method for * {@link org.codelibs.core.convert.BinaryConversionUtil#toBinary(java.lang.Object)} * . */ @Test public void testToBinaryException() {
Java - Registered: Fri Apr 26 20:58:09 GMT 2024 - Last Modified: Thu Mar 07 01:59:08 GMT 2024 - 2K bytes - Viewed (0) -
src/main/java/org/codelibs/core/security/MessageDigestUtil.java
if (text == null) { return null; } final MessageDigest msgDigest = getInstance(algorithm); try { msgDigest.update(text.getBytes("UTF-8")); } catch (final UnsupportedEncodingException e) { throw new ClIllegalStateException(e); } final byte[] digest = msgDigest.digest();
Java - Registered: Fri Apr 26 20:58:09 GMT 2024 - Last Modified: Thu Mar 07 01:59:08 GMT 2024 - 3.1K bytes - Viewed (0) -
src/main/java/org/codelibs/core/crypto/CachedCipher.java
offerEncryptoCipher(cipher); } return encrypted; } public String encryptoText(final String text) { try { return Base64Util.encode(encrypto(text.getBytes(charsetName))); } catch (final UnsupportedEncodingException e) { throw new UnsupportedEncodingRuntimeException(e); } } public byte[] decrypto(final byte[] data) {
Java - Registered: Fri Apr 26 20:58:09 GMT 2024 - Last Modified: Thu Mar 07 01:59:08 GMT 2024 - 8.1K bytes - Viewed (0) -
src/test/java/org/codelibs/core/io/CopyUtilTest.java
} /** * @throws Exception */ @Test public void testFileToFile() throws Exception { int result = copy(inputFile, outputFile); assertThat(result, is(urlString.getBytes("UTF-8").length)); result = copy(outputFile, "UTF-8", writer); assertThat(writer.toString(), is(urlString)); } /** * @throws Exception */ @Test
Java - Registered: Fri Apr 26 20:58:09 GMT 2024 - Last Modified: Thu Mar 07 01:59:08 GMT 2024 - 4.6K bytes - Viewed (0) -
src/test/java/org/codelibs/core/io/FileUtilTest.java
/** * @throws Exception */ @Test public void testFileToFile() throws Exception { final byte[] bytes = readBytes(inputFile); assertThat(bytes, is("あいうえお".getBytes("UTF-8"))); } /** * @throws Exception */ @Test public void testReadUTF8() throws Exception { assertThat(FileUtil.readUTF8(getPath("hoge_utf8.txt")), is("あ")); }
Java - Registered: Fri Apr 26 20:58:09 GMT 2024 - Last Modified: Thu Mar 07 01:59:08 GMT 2024 - 1.6K bytes - Viewed (0) -
src/main/java/org/codelibs/core/io/InputStreamUtil.java
* <p> * 入力ストリームはクローズされません。 * </p> * * @param is * 入力ストリーム。{@literal null}であってはいけません * @return byteの配列 */ public static final byte[] getBytes(final InputStream is) { assertArgumentNotNull("is", is); final ByteArrayOutputStream os = new ByteArrayOutputStream(BUF_SIZE); CopyUtil.copy(is, os); return os.toByteArray(); }
Java - Registered: Fri Apr 26 20:58:09 GMT 2024 - Last Modified: Thu Mar 07 01:59:08 GMT 2024 - 3.2K bytes - Viewed (0) -
src/test/java/org/codelibs/core/misc/Base64UtilTest.java
/** * @author higa * */ public class Base64UtilTest extends TestCase { private static final String ORIGINAL = "how now brown cow\r\n"; private static final byte[] BINARY_DATA = ORIGINAL.getBytes(); private static final String ENCODED_DATA = "aG93IG5vdyBicm93biBjb3cNCg=="; /** * @throws Exception */ public void testEncode() throws Exception {
Java - Registered: Fri Apr 26 20:58:09 GMT 2024 - Last Modified: Thu Mar 07 01:59:08 GMT 2024 - 1.5K bytes - Viewed (0) -
src/main/java/org/codelibs/core/xml/DomUtil.java
assertArgumentNotNull("contents", contents); if (encoding == null) { return new ByteArrayInputStream(contents.getBytes()); } try { return new ByteArrayInputStream(contents.getBytes(encoding)); } catch (final UnsupportedEncodingException ex) { throw new IORuntimeException(ex); } } /** * 属性の値をエンコードします。
Java - Registered: Fri Apr 26 20:58:09 GMT 2024 - Last Modified: Thu Mar 07 01:59:08 GMT 2024 - 10.5K bytes - Viewed (0) -
src/main/java/org/codelibs/core/convert/BinaryConversionUtil.java
Java - Registered: Fri Apr 26 20:58:09 GMT 2024 - Last Modified: Thu Mar 07 01:59:08 GMT 2024 - 1.3K bytes - Viewed (0)