Archive for the ‘Java’ Category

Blackberry and Wi-Fi support - lack of attention or conflict of interests?

Thursday, February 12th, 2009

I have decided to write this short post to bring up to your attention the problem with Wi-Fi network support on Blackberry. RIM has made an excellent move adding Wi-Fi support to their devices. I love Blackberries, they were always my favorite devices to work with, and they are decent phones too. Lets not start [...]

Removing signatures from Blackberry applications and re-signing them

Thursday, February 12th, 2009

I was recently exploring the internals of Blackberry COD files and one of the first problems I have got was to remove a signature from the file to be able to modify it and re-apply another signature. One of the primary reasons why I have started all this was my desperate attempt to get some [...]

Understanding the primitive numeric type conversions in Java

Tuesday, October 21st, 2008

How difficult is to convert from long number to integer (int) in Java? Seems very simple - just do "(int)" and that’s all. How many times we blamed the irresponsible API designers using int type for the timeout value (in milliseconds) here and long value in other places, and so on? This subject is very [...]

Unblocking the java.util.concurrent’s blocking queues in Java

Tuesday, October 21st, 2008

The classes in java.util.concurrent package offer a bunch of nice and easy to use mechanisms to develop asynchronous application modules. One of these mechanism is BlockingQueue and its implementations. Unfortunately, one of the mechanisms Sun has forgotten to add to its API is the ability to gracefully shutdown the blocking queue. Lets consider the typical [...]

Sending multiple files in single HTTP response using Java Servlet

Friday, September 12th, 2008

Sometimes you may need to send multiple files in response to an HTTP request. There may be different use cases requiring it: sending a set of selected files to the user, sending the configuration package that contains multiple files etc. Unfortunately, this is not possible with HTTP because it is clearly request-response protocol. Theoretically it [...]

Using OUT parameters in SQL procedures called from Java to return multiple result values

Friday, July 4th, 2008

Using stored procedures and functions when working with the database server has a number of advantages: it allows to abstract and externalize the implementation of certain data-crunching algorithms, may sometimes simplify the transaction processing and may reduce the overhead caused by the complex operation since there is less data to convert/serialize. It may also make [...]

Understanding host name resolution and DNS behavior in Java

Thursday, May 22nd, 2008

What can be simpler than resolving a host name to IP address? Whoever asks this question probably does not fully understand the details of the name resolution process. Want a quiz? Just think about the host called "256.1.2.3". OK, we can go quite far if we continue this way. This article is about getting [...]

All about locale-sensitive time processing in Java

Thursday, November 22nd, 2007

This article was inspired by some issues I have found recently in some Java code that previously appeared to be solid and reliable. After talking to some friends I have realized that there is a big misunderstanding (or sometimes at least misinterpretation) of the basics of time processing - in the computers in general, not [...]

J2ME/MIDP Programming For Mobile Phones - Good, Bad and Ugly

Tuesday, September 11th, 2007

Today there are not too many technology alternatives when it comes to creating software for the cellphones. There is a number of platforms out there (like Symbian, Linux and now even Apple with the iPhone) but there only 3 of them that can be really considered for mass-market development: J2ME (the most widely available one), [...]

Using XPath for Efficient Parsing of the XML Documents in Java

Tuesday, August 28th, 2007

If you ever had to write a document parser that uses DOM API in Java, you may have mixed feelings about the simplicity of using of this API. Yes, it is simple and the concept of the document tree is very easy to understand. However, if you want to write some really good (i.e. reliable) [...]