protected void processEraseScreen(int eraseOption) throws IOException {
getConsoleInfo();
int[] written = new int[1];
switch(eraseOption) {
case ERASE_SCREEN:
COORD topLeft = new COORD();
topLeft.x = 0;
topLeft.y = info.window.top;
int screenLength = info.window.height() * info.size.x;
FillConsoleOutputCharacterW(console, ' ', screenLength, topLeft, written);
break;
case ERASE_SCREEN_TO_BEGINING:
COORD topLeft2 = new COORD();
topLeft2.x = 0;
topLeft2.y = info.window.top;
int lengthToCursor = (info.cursorPosition.y - info.window.top) * info.size.x
+ info.cursorPosition.x;
FillConsoleOutputCharacterW(console, ' ', lengthToCursor, topLeft2, written);