/** * Returns the text of the given .doc file. * * @param doc the .doc file whose text to return * @return the text of that file * @throws IOException if an IO error occurs */ public static SeekReader getText(File doc) throws IOException { RandomAccessFile raf = new RandomAccessFile(doc, "r"); RandomAccessInputStream rais = new RandomAccessInputStream(raf); return getText(rais); }
public synchronized void mark(int readlimit) { try { this.markpos = position(); } catch (IOException e) { // Set markpos to -1. Will cause exception reset. this.markpos = -1; } }
public synchronized void mark(int readlimit) { try { this.markpos = position(); } catch (IOException e) { // Set markpos to -1. Will cause exception reset. this.markpos = -1; } }
/** * Returns the text of the given .doc file. * * @param doc the .doc file whose text to return * @return the text of that file * @throws IOException if an IO error occurs */ public static SeekReader getText(File doc) throws IOException { RandomAccessFile raf = new RandomAccessFile(doc, "r"); RandomAccessInputStream rais = new RandomAccessInputStream(raf); return getText(rais); }
public synchronized void mark(int readlimit) { try { this.markpos = position(); } catch (IOException e) { // Set markpos to -1. Will cause exception reset. this.markpos = -1; } }
protected void setupDiskStream(File backingFile) throws IOException { RandomAccessInputStream rais = new RandomAccessInputStream(backingFile); diskStream = new BufferedSeekInputStream(rais, 4096); }
public synchronized void reset() throws IOException { if (this.markpos == -1) { throw new IOException("Mark has not been set."); } position(this.markpos); }
protected void setupDiskStream(File backingFile) throws IOException { RandomAccessInputStream rais = new RandomAccessInputStream(backingFile); diskStream = new BufferedSeekInputStream(rais, 4096); }
public int available() throws IOException { long amount = this.raf.length() - this.position(); return (amount >= Integer.MAX_VALUE)? Integer.MAX_VALUE: (int)amount; }
protected void setupDiskStream(File backingFile) throws IOException { RandomAccessInputStream rais = new RandomAccessInputStream(backingFile); diskStream = new BufferedSeekInputStream(rais, 4096); }
public synchronized void reset() throws IOException { if (this.markpos == -1) { throw new IOException("Mark has not been set."); } position(this.markpos); }
public synchronized void reset() throws IOException { if (this.markpos == -1) { throw new IOException("Mark has not been set."); } position(this.markpos); }
public int available() throws IOException { long amount = this.raf.length() - this.position(); return (amount >= Integer.MAX_VALUE)? Integer.MAX_VALUE: (int)amount; }
public int available() throws IOException { long amount = this.raf.length() - this.position(); return (amount >= Integer.MAX_VALUE)? Integer.MAX_VALUE: (int)amount; }