Code example for BufferedInputStream

Methods: mark, skip

0
		private final int offsetOriginalStrings;
		private final int offsetTranslatedStrings;
 
		public BinaryMoFileParser(InputStream is) throws IOException {
			this.is = is;
			this.reader = new BufferedInputStream(is, is.available());
			this.reader.mark(9999999);
			int magic = readIntLE();
			if (magic != 0x950412de) throw new IOException("Invalid magic in MO file");
			this.reader.skip(4);
			numStrings = readIntLE();
			offsetOriginalStrings = readIntLE();
			offsetTranslatedStrings = readIntLE();
		} 
 
		public void close() throws IOException { 
			reader.close();
			is.close();
		} 
 
		private static final String charset = "utf-8";