Skip to content

Commit

Permalink
Move IO implementation classes to a separate package
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Dec 6, 2020
1 parent 04d771c commit 322c4d9
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/main/java/org/fusesource/jansi/AnsiConsole.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
import java.util.Locale;

import org.fusesource.jansi.internal.CLibrary;
import org.fusesource.jansi.io.AnsiOutputStream;
import org.fusesource.jansi.io.AnsiProcessor;
import org.fusesource.jansi.io.FastBufferedOutputStream;
import org.fusesource.jansi.io.WindowsAnsiProcessor;

import static org.fusesource.jansi.internal.CLibrary.isatty;
import static org.fusesource.jansi.internal.Kernel32.GetConsoleMode;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/fusesource/jansi/AnsiPrintStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;

import org.fusesource.jansi.io.AnsiOutputStream;

/**
* Simple PrintStream holding an AnsiOutputStream.
* This allows changing the mode in which the underlying AnsiOutputStream operates.
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/org/fusesource/jansi/io/AnsiOutputStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.fusesource.jansi;
package org.fusesource.jansi.io;

import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.charset.Charset;
import java.util.ArrayList;

import org.fusesource.jansi.AnsiMode;
import org.fusesource.jansi.AnsiProcessorType;

/**
* A ANSI print stream extracts ANSI escape codes written to
* an output stream and calls corresponding <code>AnsiProcessor.process*</code> methods.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/fusesource/jansi/io/AnsiProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.fusesource.jansi;
package org.fusesource.jansi.io;

import java.io.IOException;
import java.io.OutputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.fusesource.jansi;
package org.fusesource.jansi.io;

import java.io.FilterOutputStream;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.fusesource.jansi;
package org.fusesource.jansi.io;

import static org.fusesource.jansi.internal.Kernel32.BACKGROUND_BLUE;
import static org.fusesource.jansi.internal.Kernel32.BACKGROUND_GREEN;
Expand Down Expand Up @@ -41,6 +41,7 @@

import org.fusesource.jansi.internal.Kernel32.CONSOLE_SCREEN_BUFFER_INFO;
import org.fusesource.jansi.internal.Kernel32.COORD;
import org.fusesource.jansi.WindowsSupport;

/**
* A Windows ANSI escape processor, that uses JNA to access native platform
Expand Down
3 changes: 3 additions & 0 deletions src/test/java/org/fusesource/jansi/EncodingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@

import org.junit.jupiter.api.Test;

import org.fusesource.jansi.io.AnsiOutputStream;
import org.fusesource.jansi.io.AnsiProcessor;

import static org.junit.jupiter.api.Assertions.assertEquals;


Expand Down

0 comments on commit 322c4d9

Please sign in to comment.