As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Are there FOSS libraries to perform validation on Internet objects like:
domain name (is it valid? character-set, length, etc.)
e-mail address (user and domain components)
internet port numbers? (in the range 0..2^16-1, etc.)
etc.
Examples:
Domains.isValid(domainName);
IpPorts.isValid(portNumber);
EmailAddresses.isValid(emailAddress);
ImapFolderNames.isValid(imapFolderName);
UnixUsernames.isValid(username);
You get the idea.
Apache Commons Validator. You can, for example, use the EmailValidator class there.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I am looking for a website where I could practice Java coding assignments that you often get on job interviews. I mean those tasks where you need to calculate primitive numbers, implement some sorting, or do something with an Array, List or a Map. I'm quite experienced java developer, but such tasks can sometimes be tricky :)
Do you know any free websites that could help?
Thanks.
Go to interviewstreet. Companies often use it as first technical screen
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have a API that takes a javax.jcr.Session as input and does some work.So how do i generate JUnit test cases for this API.How do I create HTTP request object and jcr session from that.
If you can, just use Mockito. For me it's one of the simplest ways of getting complex objects that you need just to test your stuff.
You can do something like:
Session mockSession = Mockito.mock(Session.class);
someApiMethod(mockSession);
You can check out the documentation at the Mockito site.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I need to gather certain information from a method in a (compiled) Java class.
Among other things, I would like to find out all the existing method calls and who is the receiver of each method invocation.
Is there a library for obtaining a convenient representation of a compiled class and its declared methods (something like a DOM view) that can abstract me from interpreting the byte code my self?
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
Hi Anyone know good website for learning and updating for Java learning.
Is something like dotnetkicks.com same in Java.
Please let me know.?
http://docs.oracle.com/javase/6/docs/api/
http://docs.oracle.com/javase/7/docs/api/
Well.. in my view SO is best for it.Even you are looking for some bookmarking site.U can check www.javapins.com that is same like dotnetkicks . It a new site for bookmarking.they are doing good. bt need to improve on content side.
other than u can check javaworld.com and many more
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I want validate HTML code in Java.
Like this:
HTMLValidator.validateHTML("aaa<b>bbb<b>");
// Returns false, because tag <b> is not closed
What Java libraries exist to do this?
You can try JTidy.
JTidy is a Java port of HTML Tidy, a HTML syntax checker and pretty printer.
http://jtidy.sourceforge.net/