Package org.apache.ws.commons.util
Class Base64.SAXEncoder
- java.lang.Object
-
- org.apache.ws.commons.util.Base64.Encoder
-
- org.apache.ws.commons.util.Base64.SAXEncoder
-
- Enclosing class:
- Base64
public static class Base64.SAXEncoder extends Base64.Encoder
AnBase64.Encoder, which is writing to a SAX content handler. This is typically used for embedding a base64 stream into an XML document.
-
-
Field Summary
Fields Modifier and Type Field Description private org.xml.sax.ContentHandlerhandler
-
Constructor Summary
Constructors Constructor Description SAXEncoder(char[] pBuffer, int pWrapSize, java.lang.String pSep, org.xml.sax.ContentHandler pHandler)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidwriteBuffer(char[] pChars, int pOffset, int pLen)Writes to the content handler.-
Methods inherited from class org.apache.ws.commons.util.Base64.Encoder
flush, write
-
-
-
-
Constructor Detail
-
SAXEncoder
public SAXEncoder(char[] pBuffer, int pWrapSize, java.lang.String pSep, org.xml.sax.ContentHandler pHandler)Creates a new instance.- Parameters:
pBuffer- The encoders buffer.pWrapSize- A nonzero value indicates, that a line wrap should be performed after the given number of characters. The value must be a multiple of 4. Zero indicates, that no line wrap should be performed.pSep- The eol sequence being used to terminate a line in case of line wraps. May be null, in which case the default valueBase64.LINE_SEPARATORis being used.pHandler- The target handler.
-
-
Method Detail
-
writeBuffer
protected void writeBuffer(char[] pChars, int pOffset, int pLen) throws java.io.IOExceptionWrites to the content handler.- Specified by:
writeBufferin classBase64.Encoder- Parameters:
pChars- The buffer being written.pOffset- Offset of first character being written.pLen- Number of characters being written.- Throws:
Base64.SAXIOException- Writing to the content handler caused a SAXException.java.io.IOException- Writing to the destination failed.
-
-