informatique:java:tips
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédenteProchaine révisionLes deux révisions suivantes | ||
informatique:java:tips [25/04/2011 16:43] – Convert a Java OutputStream to an InputStream cyrille | informatique:java:tips [28/12/2015 01:05] – [Process Input Stream Reader] cyrille | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
====== Java Tips ====== | ====== Java Tips ====== | ||
- | ===== Swing UI ===== | + | Plein de choses interressantes dans le livre " |
- | * [[http://download.oracle.com/javase/ | + | http://filthyrichclients.org/ Le bouquin de Romain Guy & Chet Haase. In Filthy Rich Clients, we explain how to create filthy rich effects in your applications, from the fundamental graphics, GUI, and animation technology up through sample code and algorithms for the effects themselves. Des exemples de code. |
+ | [[http:// | ||
+ | ===== Swing ===== | ||
+ | |||
+ | * [[http:// | ||
+ | * About [[/ | ||
+ | * Plein d' | ||
===== CVS Format ===== | ===== CVS Format ===== | ||
* [[http:// | * [[http:// | ||
+ | |||
+ | ===== Process Input Stream Reader ===== | ||
+ | |||
+ | <code java> | ||
+ | import java.io.BufferedReader; | ||
+ | import java.io.IOException; | ||
+ | import java.io.InputStream; | ||
+ | import java.io.InputStreamReader; | ||
+ | import java.net.InetAddress; | ||
+ | import java.net.UnknownHostException; | ||
+ | import java.io.*; | ||
+ | |||
+ | public class Traceroute { | ||
+ | | ||
+ | Runtime t = Runtime.getRuntime(); | ||
+ | try { | ||
+ | | ||
+ | // | ||
+ | | ||
+ | | ||
+ | | ||
+ | int m =0; | ||
+ | | ||
+ | String content = re.readLine(); | ||
+ | System.out.println(content); | ||
+ | if(content == null){ | ||
+ | | ||
+ | } | ||
+ | } | ||
+ | | ||
+ | | ||
+ | } catch (IOException e) { | ||
+ | e.printStackTrace(); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | </ | ||
===== Convert a Java OutputStream to an InputStream ===== | ===== Convert a Java OutputStream to an InputStream ===== | ||
Ligne 24: | Ligne 68: | ||
<code java> | <code java> | ||
PipedInputStream in = new PipedInputStream(); | PipedInputStream in = new PipedInputStream(); | ||
- | | + | |
new Thread( | new Thread( | ||
new Runnable(){ | new Runnable(){ | ||
Ligne 56: | Ligne 100: | ||
class2.processDataFromInputStream(cbb.getInputStream()); | class2.processDataFromInputStream(cbb.getInputStream()); | ||
</ | </ | ||
+ | |||
+ | ===== Serial communication ===== | ||
+ | |||
+ | Communication série avec Java | ||
+ | |||
+ | * http:// | ||
+ | * http:// | ||
+ | |||
+ | |||
informatique/java/tips.txt · Dernière modification : 16/06/2023 10:02 de cyrille