1 6 package org.xml.sax.ext; 7 8 import org.xml.sax.Locator ; 9 import org.xml.sax.helpers.LocatorImpl ; 10 11 12 27 public class Locator2Impl extends LocatorImpl implements Locator2 28 { 29 private String encoding; 30 private String version; 31 32 33 38 public Locator2Impl () { } 39 40 48 public Locator2Impl (Locator locator) 49 { 50 super (locator); 51 if (locator instanceof Locator2 ) { 52 Locator2 l2 = (Locator2 ) locator; 53 54 version = l2.getXMLVersion (); 55 encoding = l2.getEncoding (); 56 } 57 } 58 59 63 68 public String getXMLVersion () 69 { return version; } 70 71 76 public String getEncoding () 77 { return encoding; } 78 79 80 84 90 public void setXMLVersion (String version) 91 { this.version = version; } 92 93 99 public void setEncoding (String encoding) 100 { this.encoding = encoding; } 101 } 102 | Popular Tags |