public <T> DataWriter<T> createWriter(Class<T> cls) {
if (cls == XMLStreamWriter.class) {
return (DataWriter<T>)new XMLStreamDataWriter(this);
} else if (cls == XMLEventWriter.class) {
return (DataWriter<T>)new EventDataWriter(this);
} else if (cls == Message.class) {
return (DataWriter<T>)new MessageDataWriter(this);
} else if (cls == Node.class) {
return (DataWriter<T>)new NodeDataWriter(this);
} else if (cls == SOAPBody.class) {