RleProgram.java - public class RleProgram { public static...

This preview shows page 1 - 2 out of 2 pages.

The preview shows page 1 - 2 out of 2 pages.
public class RleProgram { public static void main(String[] args) {//Variable initializationint option = 10;String fileName;String rleString;String rleHexString;String hexStringFlat;byte[] flatData = nullScanner scanner1 = new Scanner(System.in);//Initial ouput and spectrum imageSystem.out.println("Welcome to the RLE image encoder!";System.out.println();System.out.println("Displaying Spectrum Image:");ConsoleGfx.displayImage(ConsoleGfx.testRainbow);System.out.println();//This while loop prints the menu after every inputwhile (option != 0){System.out.println();System.out.println("RLE Menu");System.out.println("--------");System.out.println("0. Exit");System.out.println("1. Load File");System.out.println("2. Load Test Image");System.out.println("3. Read RLE String");System.out.println("4. Read RLE Hex String");System.out.println("5. Read Data Hex String");System.out.println("6. Display Image")System.out.println("7. Display RLE String");System.out.println("8. Display Hex RLE Data");System.out.println("9. Display Hex Flat Data");System.out.println();System.out.print("Select a Menu Option: ");option = scanner1.nextInt();
End of preview. Want to read all 2 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Spring
Professor
Staff
Tags
Standard test image

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture