I have an interface and a method in it
void setSource (FileInputStream fis) throws IOException; I implemented this method:
@Override public void setSource(FileInputStream fis) throws IOException { StringBuffer stringBuffer = new StringBuffer(); int i = -1; while ((i = fis.read()) != -1) { stringBuffer.append((char)i); } this.text = stringBuffer.toString(); } And this implementation works only with Latin characters, and Cyrillic is displayed crookedly. How to fix it?