1 19 package org.netbeans.modules.xml.catalog.lib; 20 21 import java.io.*; 22 import java.util.*; 23 24 import org.openide.text.*; 25 26 34 public abstract class StreamEnvironment implements CloneableEditorSupport.Env { 35 36 37 private static final long serialVersionUID =9098951539895727443L; 38 39 private InputStream peer; 40 41 private final Date modified; 42 43 44 45 public StreamEnvironment(InputStream in) { 46 if (in == null) throw new NullPointerException (); 47 peer = in; 48 modified = new Date(); 49 } 50 51 public void markModified() throws java.io.IOException { 52 throw new IOException("r/o"); } 54 55 public void unmarkModified() { 56 } 57 58 public void removePropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener) { 59 } 60 61 public boolean isModified() { 62 return false; 63 } 64 65 public java.util.Date getTime() { 66 return modified; 67 } 68 69 public void removeVetoableChangeListener(java.beans.VetoableChangeListener vetoableChangeListener) { 70 } 71 72 public boolean isValid() { 73 return true; 74 } 75 76 public java.io.OutputStream outputStream() throws java.io.IOException { 77 throw new IOException("r/o"); } 79 80 83 public java.lang.String getMimeType() { 84 return "text/xml"; } 86 87 public java.io.InputStream inputStream() throws java.io.IOException { 88 return peer; 89 } 90 91 public void addVetoableChangeListener(java.beans.VetoableChangeListener vetoableChangeListener) { 92 } 93 94 public void addPropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener) { 95 } 96 97 } 98 | Popular Tags |