Skip to content

Instantly share code, notes, and snippets.

@Kagee
Created October 2, 2011 21:12
Show Gist options
  • Save Kagee/1257964 to your computer and use it in GitHub Desktop.
Save Kagee/1257964 to your computer and use it in GitHub Desktop.
public class ReplacingInputStream extends FilterInputStream
public ReplacingInputStream(InputStream in) {
super(in);
this.in = in;
}
public int read() throws IOException {
int read = super.read();
if (read!=-1 && read<0x20 && !(read==0x9 || read==0xA || read==0xB))
{ read = 0x20;}
return read;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment