Java XML Transform newTransformerFactory()

Here you can find the source of newTransformerFactory()

Description

new Transformer Factory

License

Apache License

Declaration

public static TransformerFactory newTransformerFactory() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import javax.xml.transform.*;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

public class Main {
    private static final Lock factoryLock = new ReentrantLock();

    public static TransformerFactory newTransformerFactory() {
        factoryLock.lock();// ww w.j a v  a 2  s.  c  om
        try {
            return TransformerFactory.newInstance();
        } finally {
            factoryLock.unlock();
        }
    }
}

Related

  1. newTransformer()
  2. newTransformer(boolean indented)
  3. newTransformer(int indent)
  4. newTransformerFactory()
  5. newTransformerFactory()
  6. newTransformerHandler()
  7. newTransformerHandler()
  8. newTransformerHandler(final SAXTransformerFactory tf)
  9. serializeXML(Transformer transformer, Source input)