xor2(plain.getBytes(StandardCharsets.UTF_8), key.getBytes(StandardCharsets.UTF_8))
public static String byteArrayToHex(byte[] a) {
StringBuilder sb = new StringBuilder(a.length * 2);
for(byte b: a)
sb.append(String.format("%02x", b));
return sb.toString();
}
select s,
substr(s, nullif( instr(s,'.', -1) +1, 1) )
from (
select 'no_extension_should_return_null' s from dual union
select 'another.test.1' from dual union
select 'another.test.doc' from dual union
select 'another.test.docx' from dual union
select 'another.test.stupidlng' from dual
)
MediaType.TEXT_PLAIN
In this example we are going to see how you can upload a File to a server using a JAX-RS REST Service using Jersey. Uploading a File using Jersey is