List of usage examples for org.apache.commons.vfs2 RandomAccessContent skipBytes
int skipBytes(int n) throws IOException;
From source file:org.mycore.datamodel.ifs2.MCRFileTest.java
@Test public void randomAccessContent() throws Exception { MCRFile file = col.createFile("foo.txt"); byte[] content = "Hello World".getBytes("UTF-8"); file.setContent(new MCRByteContent(content, System.currentTimeMillis())); RandomAccessContent rac = file.getRandomAccessContent(); rac.skipBytes(6); InputStream in = rac.getInputStream(); char c = (char) in.read(); assertEquals('W', c); in.close();/*from ww w . j a v a 2s. c o m*/ rac.close(); }