Class HtmlOffsetInserter
- java.lang.Object
-
- com.levigo.jadice.server.mail.worker.internal.util.HtmlOffsetInserter
-
public class HtmlOffsetInserter extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static int[]
NEEDLE
The int representation of the needle string.static String
NEEDLE_STRING
The needle stream in the rtf document.static String
OFFSET_PREFIX
Offset marker prefix.static String
OFFSET_SUFFIX
Offset marker suffix.
-
Constructor Summary
Constructors Constructor Description HtmlOffsetInserter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
getBOMBytes(org.apache.commons.io.input.BOMInputStream bomInputStream)
static com.levigo.jadice.document.io.SeekableInputStream
insertOffsetIntoHTMLStream(com.levigo.jadice.document.io.SeekableInputStream sis, String encoding, double pageViewHeight, double pageViewHeightOffset)
Inserts the html body offset such that the body appears below the email metadata.
-
-
-
Field Detail
-
OFFSET_PREFIX
public static final String OFFSET_PREFIX
Offset marker prefix.- See Also:
- Constant Field Values
-
OFFSET_SUFFIX
public static final String OFFSET_SUFFIX
Offset marker suffix.- See Also:
- Constant Field Values
-
NEEDLE_STRING
public static final String NEEDLE_STRING
The needle stream in the rtf document. The rtf offset marker will be inserted in front of this marker.- See Also:
- Constant Field Values
-
NEEDLE
public static final int[] NEEDLE
The int representation of the needle string.
-
-
Method Detail
-
insertOffsetIntoHTMLStream
public static com.levigo.jadice.document.io.SeekableInputStream insertOffsetIntoHTMLStream(com.levigo.jadice.document.io.SeekableInputStream sis, String encoding, double pageViewHeight, double pageViewHeightOffset) throws IOException
Inserts the html body offset such that the body appears below the email metadata.- Parameters:
sis
- the input stream.encoding
- the encoding that has been determined for the input stream.pageViewHeight
- this parameter is ignored.pageViewHeightOffset
- the offset.- Returns:
- the html body string with the proper top offset such that it fits to the previously generated mail metadata.
- Throws:
IOException
- If an I/O error occurs
-
getBOMBytes
public static byte[] getBOMBytes(org.apache.commons.io.input.BOMInputStream bomInputStream) throws IOException
- Throws:
IOException
-
-