Code example for InputStream

Methods: readskip

0
			final InputStream stream = myFile.getInputStream();
			if (stream == null) {
				return new byte[0]; 
			} 
 
			stream.skip(myOffset);
			byte [] buffer = new byte[mySize];
			stream.read(buffer, 0, mySize);
			return buffer;
		} catch (IOException e) {}
		 
		return new byte[0]; 
	} 
} 
Contextual code suggestions in your IDE  Get Codota for Java