Package org.daisy.braille.pef
Class PEFFileSplitter
java.lang.Object
org.daisy.braille.pef.PEFFileSplitter
- All Implemented Interfaces:
ErrorHandler
Splits a PEF-file into several single volume files. The main purpose is to
interact with software that operates on one volume at a time.
- Author:
- Joel HÃ¥kansson
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiderror(SAXParseException exception) voidfatalError(SAXParseException exception) booleanSplits a PEF-file into several single volume PEF-files.booleansplit(InputStream is, File directory) Splits the PEF-document provided as an input stream into several single volume PEF-files using the default file name pre- and postfix.booleansplit(InputStream is, File directory, String prefix, String postfix) Splits the PEF-document provided as an input stream into several single volume PEF-files using the supplied file name pre- and postfix.voidwarning(SAXParseException exception)
-
Field Details
-
PREFIX
Defines the default prefix for generated file names.- See Also:
-
POSTFIX
Defines the default postfix for generated file names.- See Also:
-
-
Constructor Details
-
PEFFileSplitter
public PEFFileSplitter()Creates a new PEFFileSplitter object.
-
-
Method Details
-
split
Splits a PEF-file into several single volume PEF-files.- Parameters:
input- input PEF-filedirectory- output directory- Returns:
- returns true if split was successful, false otherwise
- Throws:
IllegalArgumentException- if input is not a file
-
split
Splits the PEF-document provided as an input stream into several single volume PEF-files using the default file name pre- and postfix.- Parameters:
is- the input stream to the PEF-documentdirectory- the output directory- Returns:
- returns true if split was successful, false otherwise
-
split
Splits the PEF-document provided as an input stream into several single volume PEF-files using the supplied file name pre- and postfix.- Parameters:
is- the input stream to the PEF-documentdirectory- the output directoryprefix- the prefix to usepostfix- the postfix to use- Returns:
- returns true if split was successful, false otherwise
-
error
- Specified by:
errorin interfaceErrorHandler- Throws:
SAXException
-
fatalError
- Specified by:
fatalErrorin interfaceErrorHandler- Throws:
SAXException
-
warning
- Specified by:
warningin interfaceErrorHandler- Throws:
SAXException
-