@@ -0,0 +1,1505 @@
+package io.github.rlee287.jrainbuck.uppering;%0A%0Aimport java.io.IOException;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Path;%0Aimport java.nio.file.Paths;%0Aimport java.util.ArrayList;%0A%0Aimport io.github.rlee287.jrainbuck.constants.Constants;%0A%0Apublic class UVBCreator implements UVCreator %7B%0A%09public byte%5B%5D rawInput;%0A%09private String inputFile;%0A%09private ArrayList%3CByte%3E UVB=new ArrayList%3CByte%3E();%0A%09public UVBCreator(String inputFile) %7B%0A%09%09this.inputFile=inputFile;%0A%09%7D%0A%09private void readRaw() throws IOException %7B%0A%09%09Path inputFilePath=Paths.get(inputFile);%0A%09%09rawInput=Files.readAllBytes(inputFilePath);%0A%09%7D%0A%09private void emitUV() %7B%0A%09%09/*%0A%09%09 * 0 %7C0 %7C0 %7C0 %7C0 %7C0 %7C0 %7C0%0A%09%09 * %5B%5D%7C+-%7C%3C%3E%7C.,%7C00%7C00%7C00%7Csign%0A%09%09 */%0A%09%09for ( byte inst:rawInput ) %7B%0A%09%09%09Character in=new Character((char) inst);%0A%09%09%09Byte mapped=Constants.UVB_MAP.get(in);%0A%09%09%09if (mapped!=null) %7B%0A%09%09%09%09UVB.add(mapped);%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%09/* (non-Javadoc)%0A%09 * @see io.github.rlee287.jrainbuck.uppering.UVCreator#getUV()%0A%09 */%0A%09@Override%0A%09public byte%5B%5D getUV() %7B%0A%09%09if ( UVB.size()==0 ) %7B%0A%09%09%09/* Re-emit UVB only if necessary%0A%09%09%09 * UV can be quite dangerous if re-emitted%0A%09%09%09 * (CPU usage, sunburn :-) %5Bextra )%5D? %0A%09%09%09 */%0A%09%09%09try %7B%0A%09%09%09%09this.readRaw();%0A%09%09%09%7D catch (IOException e) %7B%0A%09%09%09%09// Should never happen%0A%09%09%09%09System.err.println(%22An error has occured during uppering.%22);%0A%09%09%09%09e.printStackTrace();%0A%09%09%09%7D%0A%09%09%09this.emitUV();%0A%09%09%7D%0A%09%09byte%5B%5D returnUVB =new byte%5BUVB.size()%5D;%0A%09%09for (int index=0;index%3CUVB.size();index++) %7B%0A%09%09%09returnUVB%5Bindex%5D=UVB.get(index);%0A%09%09%7D%0A%09%09return returnUVB;%0A%09%7D%0A%7D%0A

Write base UVBCreator to implement UVCreator