Java XMLStreamWriter closeQuietly(XMLStreamWriter c)

Here you can find the source of closeQuietly(XMLStreamWriter c)

Description

close Quietly

License

Apache License

Declaration

public static void closeQuietly(XMLStreamWriter c) 

Method Source Code


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

import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
import java.io.Closeable;
import java.io.IOException;

public class Main {
    public static void closeQuietly(XMLStreamWriter c) {
        if (c == null)
            return;
        try {//from  ww w  .ja va2 s.  com
            c.close();
        } catch (XMLStreamException ignore) {
        }
    }

    public static void closeQuietly(Closeable c) {
        if (c == null)
            return;
        try {
            c.close();
        } catch (IOException ignore) {
        }
    }
}

Related

  1. addObjectId(final XMLStreamWriter writer, final String objId)
  2. CloseNewHTML(XMLStreamWriter serializer)
  3. copy(Reader reader, XMLStreamWriter xmlStreamWriter)
  4. CreateColumn(XMLStreamWriter serializer, String w, String h)
  5. CreateSimpleImage(XMLStreamWriter serializer, URL url, int w, int h)
  6. CreateSimpleTagAndContent(XMLStreamWriter serializer, String tag, String content)