Example usage for org.apache.poi.hwpf.sprm SprmIterator next

List of usage examples for org.apache.poi.hwpf.sprm SprmIterator next

Introduction

In this page you can find the example usage for org.apache.poi.hwpf.sprm SprmIterator next.

Prototype

public SprmOperation next() 

Source Link

Usage

From source file:com.krawler.esp.fileparser.word.ExtractWordFile.java

License:Open Source License

private boolean isDeleted(byte[] grpprl) {
    SprmIterator iterator = new SprmIterator(grpprl, 0);
    while (iterator.hasNext()) {
        SprmOperation op = iterator.next();
        // 0 is the operation that signals a FDelRMark operation
        if (op.getOperation() == 0 && op.getOperand() != 0) {
            return true;
        }//from w  w  w  .  j  a v  a 2 s  .  c  o m
    }
    return false;
}

From source file:org.apache.nutch.parse.msword.WordExtractor.java

License:Apache License

/**
 * Used to determine if a run of text has been deleted.
 *
 * @param grpprl The list of sprms for a particular run of text.
 * @return true if this run of text has been deleted.
 *///  w  ww.j a va2 s .  co  m
private boolean isDeleted(byte[] grpprl) {
    SprmIterator iterator = new SprmIterator(grpprl, 0);
    while (iterator.hasNext()) {
        SprmOperation op = iterator.next();
        // 0 is the operation that signals a FDelRMark operation
        if (op.getOperation() == 0 && op.getOperand() != 0) {
            return true;
        }
    }
    return false;
}