Top Description Fields Constructors Methods
org.eclipse.persistence.internal.oxm.record

public Class CharacterEscapeHandlerWrapper

extends Object
implements CharacterEscapeHandler
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.internal.oxm.CharacterEscapeHandler
Imports
java.io.IOException, .Writer, java.lang.reflect.Method, org.eclipse.persistence.exceptions.XMLMarshalException, org.eclipse.persistence.internal.core.helper.CoreClassConstants, org.eclipse.persistence.internal.oxm.CharacterEscapeHandler, org.eclipse.persistence.internal.security.PrivilegedAccessHelper

INTERNAL:

This class provides an implementation of CharacterEscapeHandler that wraps a CharacterEscapeHandler from the Sun JAXB Implementation.

Field Summary

Modifier and TypeField and Description
private static final String
private final Method
private final Object
private static final Class<?>[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
escape(char[]
Array of characters to be escaped
buffer
,
int
The starting position
start
,
int
The number of characters being escaped
length
,
boolean
A value of 'true' indicates this is an attribute value
isAttributeValue
,
Writer
The resulting escaped characters will be written to this Writer
out
)

Implements org.eclipse.persistence.internal.oxm.CharacterEscapeHandler.escape.

Perform character escaping and write the result to the output.

public Object
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ESCAPE_METHOD_NAMEback to summary
private static final String ESCAPE_METHOD_NAME
escapeMethodback to summary
private final Method escapeMethod
handlerback to summary
private final Object handler
PARAMSback to summary
private static final Class<?>[] PARAMS

Constructor Detail

CharacterEscapeHandlerWrapperback to summary
public CharacterEscapeHandlerWrapper(Object sunHandler)

Method Detail

escapeback to summary
public void escape(char[] buffer, int start, int length, boolean isAttributeValue, Writer out) throws IOException

Implements org.eclipse.persistence.internal.oxm.CharacterEscapeHandler.escape.

Doc from org.eclipse.persistence.internal.oxm.CharacterEscapeHandler.escape.

Perform character escaping and write the result to the output.

Note: This feature is not supported when marshalling to the following targets:

  • javax.xml.stream.XMLStreamWriter
  • javax.xml.stream.XMLEventWriter
  • org.xml.sax.ContentHandler
  • org.w3c.dom.Node
Parameters
buffer:char[]

Array of characters to be escaped

start:int

The starting position

length:int

The number of characters being escaped

isAttributeValue:boolean

A value of 'true' indicates this is an attribute value

out:Writer

The resulting escaped characters will be written to this Writer

Annotations
@Override
Exceptions
IOException:
In an error condition, IOException can be thrown to stop the marshalling process
getHandlerback to summary
public Object getHandler()