Package com.logicaldoc.core.parser

# Class RTFParser

java.lang.Object
com.logicaldoc.core.parser.AbstractParser
com.logicaldoc.core.parser.RTFParser

All Implemented Interfaces:
  `Parser`

Direct Known Subclasses:
  `DOCParser`

public class RTFParser extends AbstractParser
A parser for the Rich Text Format

Since:
  3.5
Author:
  Michael Scholz, Alessandro Gasparini

## Constructor Summary

Constructors
Constructor
Description
`RTFParser()`

## Method Summary

Modifier and Type
Method
Description
`int`
`countPages(File input, String filename)`
Same as the other `Parser.countPages(InputStream, String)`, but use this when you have a file rather than a stream.
`int`
`countPages(InputStream input, String filename)`
Counts the number of pages of the given binary document.
`void`
`internalParse(InputStream input, ParseParameters parameters, StringBuilder content)`

### Methods inherited from class com.logicaldoc.core.parser.AbstractParser

`parse, parse, parse, parse`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### RTFParser

public RTFParser()

## Method Details

### internalParse

public void internalParse(InputStream input, ParseParameters parameters, StringBuilder content)

### countPages

public int countPages(InputStream input, String filename)
Description copied from interface: `Parser`
Counts the number of pages of the given binary document.

Specified by:
  `countPages` in interface `Parser`
Overrides:
  `countPages` in class `AbstractParser`
Parameters:
  `input` - binary content from which to extract the text
  `filename` - name of the file
Returns:
  the number of pages

### countPages

public int countPages(File input, String filename)
Description copied from interface: `Parser`
Same as the other `Parser.countPages(InputStream, String)`, but use this when you have a file rather than a stream.

Specified by:
  `countPages` in interface `Parser`
Overrides:
  `countPages` in class `AbstractParser`
Parameters:
  `input` - the file
  `filename` - name of the file
Returns:
  the number of pages