Pro Java Programming, Second Edition

Pro Java Programming, Second Edition English |2005 | 720 pages | ISBN 1590594746 | PDF | 15 MB Fully updated for the Java 2 Platform, Standard Edition version 5.0, the third edition of this praised book is a one-stop resource for serious Java developers. This book shows you the parts of Java Swing API that [...]

Java Web Services: Up and Running

Book Description This example-driven book offers a thorough introduction to Java’s APIs for XML Web Services (JAX-WS) and RESTful Web Services (JAX-RS). Java Web Services: Up and Running takes a clear, pragmatic approach to these technologies by providing a mix of architectural overview, complete working code examples, and short yet precise instructions for compiling, deploying, [...]

Sending a HTTP request from Java code

import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; public class HTTPRequest { public static void main(String[] args) { String requestUrl = “http://www.google.com.hk“; try { URL url = new URL(requestUrl.toString()); BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream())); String inputLine; System.out.println(“—–RESPONSE START—–“); while ((inputLine = in.readLine()) != null) { System.out.println(inputLine); } in.close(); System.out.println(“—–RESPONSE END—–“); } catch (IOException e) [...]