2011
ServerSocket (Java Platform SE 6)
SO_REUSEADDR for Java -- how to avoid java.net.BindException (at the risk of odd TCP state)
[code]
ServerSocket x = new ServerSocket();
x.setReuseAddress(true);
x.bind(new InetSocketAddress(port));
[/code]
2010
Remonter silencieusement une checked-exception - adiGuba:Blog - Club des décideurs et professionnels en Informatique
(via)petit discours sur les exceptions en Java. j'aime bien le } catch (IOException e) {
throw new RuntimeException(e);
}
et
public class UncheckedException extends RuntimeException {
public UncheckedException(Throwable source) {
super(source);
}
@Override
public Throwable fillInStackTrace() {
// On empêche la génération du stacktrace.
return this;
}
}
Bug ID: 4199068 Please return the functionality of getenv()
(via)Due to overwhelming demand we are going to reconsider this position for the 1.5 release. -- xxxxx@xxxxx 2002/4/30
... so is it available or not, after all ?
Java encodings and charset
(via)You mean it's called "ISO-8859-1" in java.nio and "ISO8859_1" in java.io !? Wtf!?
2009
DataInput (Java 2 Platform SE 5.0)
Silverbullet when doing networking IO.
Features readLine, readInt, readFully(byte[])
How do I trap CTRL-C in my Java app?
(via)post-processing and app finalisation in java, without going through the hassle of explicit UNIX signal handlers.
The For-Each Loop
(via) void cancelAll(Collection<TimerTask> c) {
for (TimerTask t : c)
t.cancel();
}
Java 2 Platform SE v1.3.1: Class BufferedReader
(via)you want readline() for implementing HTTP in java ? here it is, not in BufferedInputStream
Java and unsigned int, unsigned short, unsigned byte, unsigned long, etc. (Or rather, the lack thereof)
(via)"Well, you're probably not going to like this...
The answer is, you use the signed types that are larger than the original unsigned type"
socket : Java Glossary
(via)interesting hints about socket programming in Java, though i don't know how much of that is accurate/up to date (e.g. graceful shutdown looks odd)
MessageDigest (Java Platform SE 6)
MessageDigest md = MessageDigest.getInstance("SHA");
2007
javax.xml.xpath (Java 2 Platform SE 5.0)
(via)xpath pour accéder aux documents XML en Java (comme si c'était des répertoires)
Le BaRBeRy v 1.0 : Dictionnaire CoRHuPOP (Cognitivo-Rapo-Humoristico-Poético-Oulipo-Psychanalytique)
by 4 othersun générateur de mots, de rimes, etc. à la MC Solaar. Ca a l'air super-fun et bien habillé, mais je n'ai vraiment pas le temps de creuser plus
1
(20 marks)