JAL-1807 test
[jalviewjs.git] / bin / com / stevesoft / pat / wrap / WriterWrap.js
1 Clazz.declarePackage ("com.stevesoft.pat.wrap");
2 Clazz.load (["com.stevesoft.pat.BasicStringBufferLike"], "com.stevesoft.pat.wrap.WriterWrap", null, function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.w = null;
5 Clazz.instantialize (this, arguments);
6 }, com.stevesoft.pat.wrap, "WriterWrap", null, com.stevesoft.pat.BasicStringBufferLike);
7 Clazz.makeConstructor (c$, 
8 function (w) {
9 this.w = w;
10 }, "java.io.Writer");
11 Clazz.overrideMethod (c$, "appendC", 
12 function (c) {
13 try {
14 this.w.write ((c).charCodeAt (0));
15 } catch (ioe) {
16 if (Clazz.exceptionOf (ioe, java.io.IOException)) {
17 } else {
18 throw ioe;
19 }
20 }
21 }, "~S");
22 Clazz.overrideMethod (c$, "append", 
23 function (s) {
24 try {
25 this.w.write (s);
26 } catch (ioe) {
27 if (Clazz.exceptionOf (ioe, java.io.IOException)) {
28 } else {
29 throw ioe;
30 }
31 }
32 }, "~S");
33 Clazz.overrideMethod (c$, "toStringLike", 
34 function () {
35 return null;
36 });
37 Clazz.overrideMethod (c$, "unwrap", 
38 function () {
39 return this.w;
40 });
41 });