Code example for InputStream

Methods: skip

0
			final InputStream stream = myFile.getInputStream();
			if (stream == null) {
				return new byte[0]; 
			} 
 
			stream.skip(myOffset);
			byte [] targetBuffer = new byte[65535];
			final int size = DocDecompressor.decompress(stream, targetBuffer, myCompressedSize);
			if (size > 0 && size != 65535) {
				byte [] buffer = new byte[size];
				System.arraycopy(targetBuffer, 0, buffer, 0, size);
				return buffer;
			} 
			return targetBuffer;
		} catch (IOException e) {}
		 
		return new byte[0]; 
	} 
} 
Experience pair programming with AI  Get Codota for Java