download zip of files only
Fri Apr 21 23:07:50 GMT 2023
From /weblog/java/features
Introduction to Java Encryption/Decryption - https://dev.java/learn/security/intro/ Java Serialization Filtering: Prevent 0-day Security Vulnerabilities - https://foojay.io[..]g-prevent-0-day-security-vulnerabilities Using JCE with OpenSSL - http://kasparov.skife.org[..]ive/src/java/jce-openssl-redux.writeback ---------- Forwarded message ---------- From: "cab" To: Date: 10 Mar 2005 23:33:16 +0800 Subject: Re: CRC-32
java.util.zip.CRC32 crc32 = new java.util.zip.CRC32(); crc32.update(byteArray); long crcValue = crc32.getValue();
"Day Chan" 撰寫於郵件新聞:[email protected]... > Does anyone know how to calculate CRC-32 in Java? > Thanks~
(google search)
(amazon search)
Wed Jul 06 13:31:29 GMT 2022
From /weblog/java/features
Strategies of loading image, select difference API to load image in difference case - http://java.sun.com[..]rticles/Media/imagestrategies/index.html The Perils of Image.getScaledInstance() , with more detail explanation of image handling - http://today.java.net[..]3/perils-of-image-getscaledinstance.html In Part I we talk about the building blocks of metadata in images and how it may matter to you as developer. - https://hillert.com/blog/read-write-image-metadata-java-part-1/
(google search)
(amazon search)
Sat Mar 19 12:00:19 GMT 2022
From /weblog/java/concurrency
Just know that interrupt() call is just setting a flag, it have to be doing IO work (like database call), or in wait() status, before the thread can really be interrupted. http://blogs.sun.com[..]winger?entry=swingworker_stop_that_train Another nice explanation about interrupt, in summary: What should we do when we call code that may cause an InterruptedException? Don't immediately yank out the batteries! Typically there are two answers to that question: 1) Rethrow the InterruptedException from your method. This is usually the easiest and best approach. It is used by the new java.util.concurrent.* package [ http://java.sun.com[..]util/concurrent/Semaphore.html#acquire() ], which explains why we are now constantly coming into contact with this exception. 2) Catch it, set interrupted status, return. If you are running in a loop that calls code which may cause the exception, you should set the status back to being interrupted. For example: while (!Thread.currentThread().isInterrupted()) { // do something try { TimeUnit.SECONDS.sleep(1000); } catch (InterruptedException e) { Thread.currentThread().interrupt(); break; } } Remember the Law of the Sabotaged Doorbell - don't just ignore interruptions, manage them properly! - http://www.javaspecialists.eu/archive/Issue146.html Another blog explain about InterruptedException - http://www.nurkiewicz.com[..]terruptedexception-and-interrupting.html http://ocpsoft.org[..]running-infinite-java-regular-expression http://praveer09.github.io[..]derstanding-thread-interruption-in-java/ How to Stop a Java Thread Without Using Thread.stop()? - https://4comprehension.com[..]a-java-thread-without-using-thread-stop/
(google search)
(amazon search)
|