repositories
/
TD_SR.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TD3: convert to unix LF the code skeleton for hostels.
[TD_SR.git]
/
TD2
/
client
/
ClientSimplifie.java
diff --git
a/TD2/client/ClientSimplifie.java
b/TD2/client/ClientSimplifie.java
index 5a2e0485f2282c0dcf347bbc05366e9fd21e8b6d..1701ecd6e04abdeb41b87e7db8516152c2f30d18 100644
(file)
--- a/
TD2/client/ClientSimplifie.java
+++ b/
TD2/client/ClientSimplifie.java
@@
-16,6
+16,7
@@
public class ClientSimplifie {
}
catch (IOException e) {
System.err.println("IOException: " + e);
}
catch (IOException e) {
System.err.println("IOException: " + e);
+ e.printStackTrace();
closeRWIO();
}
}
closeRWIO();
}
}
@@
-29,6
+30,7
@@
public class ClientSimplifie {
}
catch (IOException e) {
System.err.println("IOException: " + e);
}
catch (IOException e) {
System.err.println("IOException: " + e);
+ e.printStackTrace();
closeRWIO();
}
}
closeRWIO();
}
}
@@
-38,20
+40,19
@@
public class ClientSimplifie {
// puis établie les chaînages de flot nécessaires
// pour l'envoi et la reception de messages
sock = new Socket(adresseIPServeur, portServeur);
// puis établie les chaînages de flot nécessaires
// pour l'envoi et la reception de messages
sock = new Socket(adresseIPServeur, portServeur);
- InputStream IStream = null;
- IStream = sock.getInputStream();
- InputStreamReader IMesg = new InputStreamReader(IStream);
- lecture = new BufferedReader(IMesg);
- OutputStream OStream = null;
- OStream = sock.getOutputStream();
+ OutputStream OStream = sock.getOutputStream();
ecriture = new PrintWriter(OStream);
ecriture = new PrintWriter(OStream);
+
+ InputStream IStream = sock.getInputStream();
+ InputStreamReader IMesg = new InputStreamReader(IStream);
+ lecture = new BufferedReader(IMesg);
}
private void attributesInit() {
}
private void attributesInit() {
+ sock = null;
lecture = null;
ecriture = null;
lecture = null;
ecriture = null;
- sock = null;
}
/**
}
/**
@@
-88,6
+89,7
@@
public class ClientSimplifie {
}
catch (IOException e) {
System.err.println("IOException: " + e);
}
catch (IOException e) {
System.err.println("IOException: " + e);
+ e.printStackTrace();
}
}
}
}