package baf.sci; import com.sun.java.swing.JTextArea; import java.awt.Font; public class GenericViewer extends JTextArea { final byte b[]; final int offset, len; static final Font font = Font.getFont("Courier"); /** Creates a viewer for an entire buffer. */ public GenericViewer(byte b[]) { this.b = b; this.offset = 0; this.len = b.length; setFont(font); process(); } /** Creates a viewer for a part of a buffer. */ public GenericViewer(byte b[], int offset, int len) { this.b = b; this.offset = offset; this.len = len; setFont(font); process(); } private final void process() { int end = offset+len; int col = 0; for (int i=offset; i