equal
deleted
inserted
replaced
77 |
77 |
78 /** Stream that understands "printing" */ |
78 /** Stream that understands "printing" */ |
79 protected PrintStream pStream; |
79 protected PrintStream pStream; |
80 |
80 |
81 /** Return the number of bytes per atom of encoding */ |
81 /** Return the number of bytes per atom of encoding */ |
82 abstract protected int bytesPerAtom(); |
82 protected abstract int bytesPerAtom(); |
83 |
83 |
84 /** Return the number of bytes that can be encoded per line */ |
84 /** Return the number of bytes that can be encoded per line */ |
85 abstract protected int bytesPerLine(); |
85 protected abstract int bytesPerLine(); |
86 |
86 |
87 /** |
87 /** |
88 * Encode the prefix for the entire buffer. By default is simply |
88 * Encode the prefix for the entire buffer. By default is simply |
89 * opens the PrintStream for use by the other functions. |
89 * opens the PrintStream for use by the other functions. |
90 */ |
90 */ |
112 protected void encodeLineSuffix(OutputStream aStream) throws IOException { |
112 protected void encodeLineSuffix(OutputStream aStream) throws IOException { |
113 pStream.println(); |
113 pStream.println(); |
114 } |
114 } |
115 |
115 |
116 /** Encode one "atom" of information into characters. */ |
116 /** Encode one "atom" of information into characters. */ |
117 abstract protected void encodeAtom(OutputStream aStream, byte someBytes[], |
117 protected abstract void encodeAtom(OutputStream aStream, byte someBytes[], |
118 int anOffset, int aLength) throws IOException; |
118 int anOffset, int aLength) throws IOException; |
119 |
119 |
120 /** |
120 /** |
121 * This method works around the bizarre semantics of BufferedInputStream's |
121 * This method works around the bizarre semantics of BufferedInputStream's |
122 * read method. |
122 * read method. |