java-api

Unable to get a Java API without obsoletes by Javascript

I regularly observe obsolete classes and methods in Java API. I did not find Java API without obsoletes. It suggests me that you need to filter Java API by your browser to get it more readable. Javascript is apparently a good solution in filtering Java API. How can you get Java API without Obseletes by Javascript or by other method? ...

Is there an Equivalent of .Net framework's Random.Next(Int32, Int32) in the Java API ?

I am working on porting an existing VB.Net application to Java, and could not find an equivalent to Random.Next(Int32, Int32). I could find only "java.util.Random.next(int val)" in the Java API. Is there an Equivalent of .Net framework's Random.Next(Int32, Int32) in the Java API? Thanks, ...

Download Java API Documentation?

How can I get Java API Documentation for studying offline? http://java.sun.com/javase/reference/api.jsp ...

using wiimote on windows xp

I'm looking for a reliable java api for wiimote. and it should run under windows xp. does anybody here know one? ...

Examples of GoF Design Patterns

I am learning GoF Java Design Patterns and I want to see some real life examples of them. Can you guys point to some good usage of these Design Patterns.(preferably in Java's core libraries). Thank you ...

Java API to convert RTF file to Word document (97-2003 format)

Is there any Java API available which converts .rtf files to .doc file (97-2003) format? ...

String javax.xml.xpath.XPathExpression.evaluate(Object item) guarantees it never returns null in all implementations?

From the JavaDoc: returns: The String that is the result of evaluating the expression and converting the result to a String. /** * ... * ... * @return The <code>String</code> that is the result of evaluating the expression and converting the result to a * <code>String</code>. * ... * ... */ String javax.xml.xpath.XPathExpressi...

Saxon XPath API returns TinyElementImpl instead of org.w3c.dom.Node

I have the following code: // xpath evaluates to net.sf.saxon.xpath.XPathEvaluator XPath xpath = XPathFactory.newInstance().newXPath(); XPathExpression expression = xpath.compile("/foo/bar"); Object evaluate = expression.evaluate(someXML, XPathConstants.NODE); Object evaluate2 = expression.evaluate(someXML, XPathConstants.NODESET); S...

Using HttpURLConnection on Android

I am trying to connect a web server I have running in my android App however for some reason it's failing. I can connect to the webpage normally and using my phone's browser, I can also use the below code to connect to google but for some reason my code will not connect to my web server. If I host the server on port 80 I get error code ...

Java API Method Run Times

Is there a good resource to get run times for standard API functions? It's somewhat confusing when trying to optimize your program. I know Java isn't made to be particularly speedy but I can't seem to find much info on this at all. Example Problem: If I am looking for a certain token in a file is it faster to scan each line using stri...

How to create a ruby API for a java application

I have a web application written mostly in Java. There are a few users that hope to use ruby to tailor this application to suit their own needs. How would I write an API that allows Ruby developers to interact with my application? I'm really looking for some direction here - I know it's a broad question.. ...

How to inherit java classes in a Ruby on Rails environment

Background: I have a Java application that many programming clients interface with. Recently, a few clients wanted me to develop an API to allow them to inherit my application's Java classes in their Ruby documents without having to change their developing environment to Jruby - they want it to remain Ruby on Rails. In this post, it wa...

Java Dynamic Code Generation with support for generics

Is there any tool which provides Java dynamic code generation and that also supports generics? Javassist for example, is the kind of tool that I need, but it does not support generics. I wrote a small lib which uses the Java 6 Compiler API, however as far as I know it depends on JDK. Is there a way to specify another compiler? Or to sh...

Is there any in-built API for solving complex math problems like integration and differentiation

I need to implement an algorithm which has intensive mathematical calculation. Is there already support in java for this? Or are there any 3rd party vendors who provide this support? ...

Why is the java.util.Scanner class declared 'final' ?

I use the Scanner class for reading multiple similar files. I would like to extend it to make sure they all use the same delimiter and I can also add methods like skipUntilYouFind(String thisHere) that all valid for them all. I can make a utility-class that contain them, or embed the Scanner Class as a variable inside another class but ...

What is standard for Interface naming in java api

Hi, I am asked by one of colleague about the Throwable class in java API. As per standard, I do understand, every word ending *able is a interface in java API. There is a industry standard about using such words as Interface names. So, I unknowingly, told him about this as base interface for all the exception and error types in java w...