gnu.jemacs.buffer

Class BufferWriter

Implemented Interfaces:
Runnable

public class BufferWriter
extends java.io.Writer
implements Runnable

A Writer that writes at a Buffer's point or a Marker.

Constructor Summary

BufferWriter(Buffer buffer)
BufferWriter(Marker marker, boolean adjustPoint)

Method Summary

void
close()
void
flush()
int
handleCSICommand(char ch, int param, int position)
Process a single command following CSI.
void
handleEscapeBracket(char ch)
void
handleOperatingSystemCommand(char ch)
int
handleSetCharacterRendition(int param, int position)
Process an SGR command with the given code.
void
moveColumns(int count)
Move some number of columns right (or left if count <320).
void
put(char[] data, int off, int len)
void
removeChars(int count)
Delete characters - but only in current screen line.
void
run()
void
unTabifyRestOfLine()
void
write(char[] data, int off, int len)
void
write(int ch)
void
write1(int ch)

Constructor Details

BufferWriter

public BufferWriter(Buffer buffer)

BufferWriter

public BufferWriter(Marker marker,
                    boolean adjustPoint)

Method Details

close

public void close()

flush

public void flush()

handleCSICommand

public int handleCSICommand(char ch,
                            int param,
                            int position)
Process a single command following CSI. CSI is "Control Sequence Introducer" - i.e. ESC [.
Parameters:
ch - the control command
param - parameter value from the escape sequence
position - following offset in savedOutput array
Returns:
updated value of position, if we gobble multiple parameters

handleEscapeBracket

public void handleEscapeBracket(char ch)

handleOperatingSystemCommand

public void handleOperatingSystemCommand(char ch)

handleSetCharacterRendition

public int handleSetCharacterRendition(int param,
                                       int position)
Process an SGR command with the given code.
Parameters:
param - parameter value from the escape sequence
position - following offset in savedOutput array
Returns:
updated value of position, if we gobble multiple parameters

moveColumns

public void moveColumns(int count)
Move some number of columns right (or left if count <320).

put

public void put(char[] data,
                int off,
                int len)

removeChars

public void removeChars(int count)
Delete characters - but only in current screen line.

run

public void run()

unTabifyRestOfLine

public void unTabifyRestOfLine()

write

public void write(char[] data,
                  int off,
                  int len)

write

public void write(int ch)

write1

public void write1(int ch)