41 |
import java.io.OutputStream; |
import java.io.OutputStream; |
42 |
import java.io.IOException; |
import java.io.IOException; |
43 |
|
|
44 |
|
/** |
45 |
|
* @deprecated |
46 |
|
*/ |
47 |
public class LogStream |
public class LogStream |
48 |
extends PrintStream { |
extends PrintStream |
49 |
|
{ |
50 |
public static final int SILENT = 0; |
public static final int SILENT = 0; |
51 |
public static final int BRIEF = 10; |
public static final int BRIEF = 10; |
52 |
public static final int VERBOSE = 20; |
public static final int VERBOSE = 20; |
53 |
|
|
54 |
private static PrintStream defStream; |
private static PrintStream defStream; |
55 |
|
|
56 |
private LogStream(OutputStream s) { |
private LogStream(OutputStream s) |
57 |
super(s); |
{ |
58 |
} |
super(s); |
59 |
|
} |
60 |
public static LogStream log(String name) { |
|
61 |
throw new Error("Not implemented"); |
public static LogStream log(String name) |
62 |
} |
{ |
63 |
|
throw new Error("Not implemented"); |
64 |
public static PrintStream getDefaultStream() { |
} |
65 |
return (defStream); |
|
66 |
} |
public static PrintStream getDefaultStream() |
67 |
|
{ |
68 |
public static void setDefaultStream(PrintStream s) { |
return (defStream); |
69 |
defStream = s; |
} |
70 |
} |
|
71 |
|
public static void setDefaultStream(PrintStream s) |
72 |
public OutputStream getOutputStream() { |
{ |
73 |
return (out); |
defStream = s; |
74 |
} |
} |
75 |
|
|
76 |
public void setOutputStream(OutputStream s) { |
public OutputStream getOutputStream() |
77 |
out = s; |
{ |
78 |
} |
return (out); |
79 |
|
} |
80 |
public void write(int b) { |
|
81 |
super.write(b); |
public void setOutputStream(OutputStream s) |
82 |
} |
{ |
83 |
|
out = s; |
84 |
public void write(byte[] b, int off, int len) { |
} |
85 |
super.write(b, off, len); |
|
86 |
} |
public void write(int b) |
87 |
|
{ |
88 |
public String toString() { |
super.write(b); |
89 |
throw new Error("Not implemented"); |
} |
90 |
} |
|
91 |
|
public void write(byte[] b, int off, int len) |
92 |
public static int parseLevel(String s) { |
{ |
93 |
if (s.equalsIgnoreCase("silent")) { |
super.write(b, off, len); |
94 |
return (SILENT); |
} |
95 |
} |
|
96 |
if (s.equalsIgnoreCase("brief")) { |
public String toString() |
97 |
return (BRIEF); |
{ |
98 |
} |
throw new Error("Not implemented"); |
99 |
if (s.equalsIgnoreCase("verbose")) { |
} |
100 |
return (VERBOSE); |
|
101 |
} |
public static int parseLevel(String s) { |
102 |
return (SILENT); |
if (s.equalsIgnoreCase("silent")) |
103 |
|
{ |
104 |
|
return (SILENT); |
105 |
|
} |
106 |
|
|
107 |
|
if (s.equalsIgnoreCase("brief")) |
108 |
|
{ |
109 |
|
return (BRIEF); |
110 |
|
} |
111 |
|
|
112 |
|
if (s.equalsIgnoreCase("verbose")) |
113 |
|
{ |
114 |
|
return (VERBOSE); |
115 |
|
} |
116 |
|
|
117 |
|
return (SILENT); |
118 |
} |
} |
119 |
|
|
120 |
} |
} |