Tag Archives | Java

imgscalr 4.2 Released

Quick heads up to the Java developers out there using the imgscalr Image Processing Library, version 4.2 was just released! There is 1 new feature in this release and 1 bugfix: New Feature: New ULTRA_QUALITY scaling Method provides the nicest looking scaling result typically better than GIMP’s highest quality scaling method (Lanczos3)! Bug Fix: When […]

Read full story Comments { 0 }

imgscalr 4.0 released – Optimal Java Image Scaling

imgscalr is an optimized, fault-tolerant and simple Java library used to resize, rotate, filter, crop or pad images. imgscalr implements the most optimal code-paths for these tasks as recommended by the Java2D team and internally works around a number of hidden JDK and even JVM bugs pertaining to image operations via the Java2D pipeline. imgscalr […]

Read full story Comments { 3 }

imgscalr 3.2 Released

Some good news for folks using imgscalr (a Java image-scaling library), version 3.2 was released today and brings with it support for rotation, a new AsyncScalr class used for support both asynchronous scaling support as well as scale-operation throttling in high-performance systems (e.g. web application) where 100s of scaling operations firing off in parallel would bog […]

Read full story Comments { 0 }

Tomcat Context Attribute ‘antiResourceLocking’ Disables Class Reloads

This is a quick TIP for anyone working with Tomcat during development and needing it to reload changes immediately… especially if you have Tomcat setup to run your webapp directly out of your IDE’s project folder. REMINDER: Remember you have to change your Project Properties to make your [projdir]/[webdir]/WEB-INF/classes directory your output dir for built […]

Read full story Comments { 0 }

(Servlet 3.0) Using @MultipartConfig, but getParts() returns null

Setup You are trying to use the new getParts() method defined in the Servlet 3.0 spec to process your multipart/form-data HTTP-POST uploads without using Commons FileUpload. Your servlet looks something like this: @WebServlet("/image/*") @MultipartConfig(location="D:\\Temp", fileSizeThreshold=10, maxFileSize=10485760) public class ImageServlet extends APIServlet { } And your HTML looks something like this: <form action="image/upload.json?version=1.0" enctype="multipart/form-data" method="POST"> <input […]

Read full story Comments { 0 }

Understanding the Unix Epoch (in Java), Time Zones and UTC

It is funny (or maddening, depending on your mood) how long something can be under your nose until you come to assume you understand it. Only after you are forced to look at that thing in detail do you realize you have no idea how it works. That happened to me just now with Java […]

Read full story Comments { 1 }

Simple Java XML Parser (SJXP) 2.1 Released

Hot on the heals of the 2.0 release, SJXP 2.1 was released with the following changes: Fixed bug where isStartTag was always true for TAG type rules https://github.com/thebuzzmedia/simple-java-xml-parser/issues/closed#issue/6 Removed use of enhanced for-loop in code base because it caused a large number of AbstractList$Itr classes to be created for no great reason. https://github.com/thebuzzmedia/simple-java-xml-parser/issues/closed#issue/5 As always, head […]

Read full story Comments { 0 }

Simple Java XML Parser (SJXP) 2.0 Released

I am proud to scream from the top of my desk, directly at my closet, that Simple Java XML Parser (SJXP) 2.0 has just been released. The 2.0 release brings a huge performance boost over the 1.x series that decreases memory and CPU usage by an order of magnitude. Additionally, user object pass-through support was […]

Read full story Comments { 1 }

imgscalr Java Image-Scaling Library 3.1 Released

Announcement imgscalr 3.1, the high performance Java Image Scaling library was released. imgscalr’s focus has always been on simple, fast and correct image resizing in Java (an inherently convoluted subject with many different answers). The library itself consists of a single class (Scalr) and a series of thread-safe static methods used to scale an image. What is new […]

Read full story Comments { 0 }

AJAX Byte to Char (and Char to Byte) Converted Utility Released!

I just added a new AJAX utility to our suite of AJAX tools and this one can be used to convert a series of chars to bytes or a series of bytes to chars. You can try it here. The idea for this app was born out of the work I was doing on the […]

Read full story Comments { 0 }

imgscalr Java Image-Scaling Library 3.0 Released!

I would like to give a big personal thanks to Magnus Kvalheim from movellas.com for helping with one of the best features of this new release: BufferedImageOp support! Announcement imgscalr 3.0, the high performance Java Image Scaling library was released. imgscalr’s focus has always been on simple, fast and correct image resizing in Java (an […]

Read full story Comments { 0 }

Documentary on Minecraft

Minecraft is the brain-child of Markus “Notch” Persson of Mojang Specifications after having cut his teeth at his first open-world, build-anything game: Wurm Online. Both games are written in Java and as a Java developer and general fan of the language, I become interested in Wurm Online years ago, after their first alpha announcement. I […]

Read full story Comments { 0 }

Anti-Aliasing in Java 2D is an Expensive Operation

This post is more of an aside or random observation and it likely only effects folks trying to do animation or games with Java; normal folks using Swing, probably won’t care. I was just playing around running some of the old-ass JFC demos that come with the JDK on my machine; something I’ve done over […]

Read full story Comments { 2 }

imgscalr Java Image-Scaling Library 2.1 Released

Hot on the heels of the 2.0 release, imgscalr just made a 2.1 release which includes a very important enhancement that improves the visual quality of the resize operations across all the different Methods (SPEED, BALANCED or QUALITY). For some technical background on the issue, Java2D does not support all image types equally and working […]

Read full story Comments { 0 }

foursquare Check-in Hack 1.5 Released

If you are a fan of our foursquare Check-in Hack utility, then you will be happy to know version 1.5 was just released. We added support for Private check-ins, so your friends aren’t notified every single time you check-in somewhere. Thanks to user Alex Yates for the suggestion. As usual, you can grab the download […]

Read full story Comments { 0 }

Java NIO: SocketChannel read() Hangs Forever or write() Sends No Data

It was late, I was tired and it took me an hour to figure this out so I wanted to post it here for anyone else trying to frantically Google for the same terms I was using. If you are doing some Java NIO client network programming using SocketChannel, and you are doing channel.read() operations […]

Read full story Comments { 4 }

QN: imgscalr Java Image-Scaling Library 2.0 Released

Version 2.0 of the imgscalr Java image-scaling library has been released. This release matures the library, tightens up every area that could get tightened up and adds some new features: * API-break: resize(BufferedImage, Method, int, int, boolean, boolean) was removed and replaced by resize(BufferedImage, Method, int, int). * DEBUG system variable added; set ‘imgscalr.debug’ to true […]

Read full story Comments { 1 }

JavaMail SMTP on localhost Fails with Amazon AWS SDK in Classpath (SOLVED)

Update #1: I solved the stupid problem! If you are using JavaMail in your application (most likely a web application) and no matter what you do, you cannot get it to connect to your SMTP server on localhost (in my case, Postfix) and just constantly get a cryptically stupid exception message like: unable to connect […]

Read full story Comments { 1 }

QN: imgscalr Java Image-Scaling Library 1.2 Released

Version 1.2 of the imgscalr Java image-scaling library has been released. This release makes the library easier to use, accessible from the new The Buzz Media Maven repository and improved the logic used to determine the proportionally-scaled width and height for images depending on their orientation (LANDSCAPE or PORTRAIT). For download links, Javadoc, source code […]

Read full story Comments { 0 }

imgscalr – Java Image Scaling Library Released

If you have ever wanted to quickly rescale an image in Java you have probably noticed the following confusing things: There seem to be something like 9 different ways to do this: Image.getScaledInstance(), Graphics.drawImage(), Graphics2D.drawImage(…), BufferImageOps, AffineTransforms and don’t forget Java Advanced Imaging API. Which one are you suppose to use? Which one performs the […]

Read full story Comments { 1 }

FourSquare Mayor Checkin Program w/ Source Code

Update #2: This application now has an official software product page with all the links for download, usage and source code. If you just want to download the program and run it, scroll down the Download section below. Thanks! Background A few weeks ago we wrote about Mayank Lahiri’s working FourSquare checkin hack that allowed […]

Read full story Comments { 100 }

Project Lombok – Never Write Boilerplate Java Code Again

(Click to enlarge) If you read our recent article about Java 7 getting automatic resource management and were excited to never write boilerplate again, you need to try out Project Lombok. Project Lombok (created by Reinier Zwitserloot and Roel Spilker) is a annotation processor compiler plugin for javac that provides a handful of very focused […]

Read full story Comments { 3 }

AJAX Base 64 Decode/Encoder & MD5 Generator Utilities

I would like to announce the launch of a couple new AJAX-enabled online utilities that software developers might find handy: Base64 Encoder/Decoder MD5 Generator For those interested the utilities are written using the Play! Framework (Java) and JQuery/JQuery UI and the Base64 and MD5 generation is backed by the Commons Codec project. These utilities are […]

Read full story Comments { 3 }

Java IO Faster Than NIO – Old is New Again!

Alex Blewitt tweeted an article by Paul Tyma titled: Thousands of Threads and Blocking I/O: The old way to write Java servers is new again. Paul is the Founder/CEO of ManyBrain, the creator of Mailinator. Paul’s 65-slide presentation is a fast read for anyone interested in Java I/O, especially in a client/server setup. What makes […]

Read full story Comments { 25 }