[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Dependency on XB DefaultSchemaResolver

alesj do-not-reply at jboss.com
Fri Mar 6 18:02:09 EST 2009


This is now done under JBXB-191.

Is there anything else to VFSInputSource than this:

  | public class VFSInputSource extends InputSource
  | {
  |    private VirtualFile file;
  | 
  |    public VFSInputSource(VirtualFile file)
  |    {
  |       if (file == null)
  |          throw new IllegalArgumentException("Null file");
  | 
  |       this.file = file;
  |    }
  | 
  |    @Override
  |    public String getSystemId()
  |    {
  |       try
  |       {
  |          return file.toURI().toString();
  |       }
  |       catch (Exception e)
  |       {
  |          throw new RuntimeException(e);
  |       }
  |    }
  | 
  |    @Override
  |    public InputStream getByteStream()
  |    {
  |       try
  |       {
  |          return file.openStream();
  |       }
  |       catch (IOException e)
  |       {
  |          throw new RuntimeException(e);
  |       }
  |    }
  | 
  |    @Override
  |    public Reader getCharacterStream()
  |    {
  |       return new InputStreamReader(getByteStream());
  |    }
  | }
  | 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215899#4215899

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215899



More information about the jboss-dev-forums mailing list