Example usage for java.io Reader hashCode

List of usage examples for java.io Reader hashCode

Introduction

In this page you can find the example usage for java.io Reader hashCode.

Prototype

@HotSpotIntrinsicCandidate
public native int hashCode();

Source Link

Document

Returns a hash code value for the object.

Usage

From source file:org.kepler.gui.KeplerXMLIcon.java

private PaintedList _batikCreatePaintedList(String svgXMLStr) throws Exception {
    // START - EXECUTED ONLY IF svgRenderingMethod is SVG_BATIK_RENDERING
    Reader sr = new StringReader(svgXMLStr);

    final String uri = _SVG_BASE_URI + sr.hashCode();
    SVGDocument doc = _df.createSVGDocument(uri, sr);

    PaintedList list = new PaintedList();
    String name = doc.getDocumentElement().getNodeName();

    if (!name.equals("svg")) {
        throw new IllegalArgumentException(
                "Input XML has a root name which is '" + name + "' instead of 'svg'");
    }/*from  w w  w  .  ja v a2  s.  co m*/

    SVGPaintedObject object = new SVGPaintedObject(doc);
    if (object != null) {
        list.add(object);
    }

    return list;
    // END - EXECUTED ONLY IF svgRenderingMethod is SVG_BATIK_RENDERING
}