1. How can I convert an uncompressed InputStream into a gzip'ed InputStream efficiently? stackoverflow.comA user uploads a large file to my website and I want to gzip the file and store it in a blob. So I have an uncompressed InputStream and the ... |
2. Writing to a new Blob in Java stackoverflow.comI want to be able to create a new Blob object and then write to it. Originally, my general plan for this was as follows: Create a new blob (null, because there's ... |
3. OutputStream System.out to String BLOB coderanch.comThank you for your answer Nitesh! The problem is that i have byte array, which is BLOB indeed. I succeed to write it on console, but i want to write it in String or StringBuffer, because i want to use it in further code. new String(byte[]) is not good, because of BLOB type (that's sg like pointer -i suppose?) I know ... |
4. OutputStream System.out to String BLOB coderanch.comI think you should use String class.String class has a lot of method.So you can able to convert bytearray to String. you try this one: Convert the byte array to a String using the constructor String byteString = new String(byte[] bytes) ; do the replacement byteString = byteString.replace("bert|ernie" , "") ; and convert back byte [] newBytes = byteString.getBytes() ; and ... |