ruper2/src/java/core/org/krysalis/ruper2/util/net VirtualResourceLocator.java,1.2,1.3

[email protected]
Newsgroups gmane.comp.krysalis.metamorphosis.cvs
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper2/util/net
In directory sc8-pr-cvs1:/tmp/cvs-serv25339/src/java/core/org/krysalis/ruper2/util/net

Modified Files:
	VirtualResourceLocator.java 
Log Message:
Opps, did it for HTTP input but not File input. Added that.

Index: VirtualResourceLocator.java
===================================================================
RCS file: /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper2/util/net/VirtualResourceLocator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** VirtualResourceLocator.java	9 Oct 2003 20:30:27 -0000	1.2
--- VirtualResourceLocator.java	9 Oct 2003 21:14:57 -0000	1.3
***************
*** 12,15 ****
--- 12,16 ----
  import org.krysalis.ruper2.protocols.Protocol;
  import org.krysalis.ruper2.util.RuperConstants;
+ import org.krysalis.ruper2.util.io.ResolvedFile;
  
  /**
***************
*** 51,55 ****
  	}
  
! 	public VirtualResourceLocator(File file) {
  		parseString(createURLForFile(file));
  	}
--- 52,56 ----
  	}
  
! 	public VirtualResourceLocator(ResolvedFile file) {
  		parseString(createURLForFile(file));
  	}
***************
*** 63,67 ****
  			m_protocol = url.substring(0, colonPosn);
  		else
! 			m_protocol = Protocol.HTTP_PROTOCOL;
  
  		m_isDirectory = m_url.endsWith("/");
--- 64,68 ----
  			m_protocol = url.substring(0, colonPosn);
  		else
! 			m_protocol = Protocol.FILE_PROTOCOL;
  
  		m_isDirectory = m_url.endsWith("/");
***************
*** 83,86 ****
--- 84,88 ----
  		return url.toString();
  	}
+ 	
  	/**
  	 * May not be possible for all VirtualResourceLocators
***************
*** 89,94 ****
  	 * @throws MalformedURLException
  	 */
! 	public URL getResourceLocator() throws MalformedURLException {
  		return new URL(m_url);
  	}
  
--- 91,106 ----
  	 * @throws MalformedURLException
  	 */
! 	public URL getURL() throws MalformedURLException {
  		return new URL(m_url);
+ 	}
+ 	
+ 	/**
+ 	 * May not be possible for all VirtualResourceLocators
+ 	 * 
+ 	 * @return
+ 	 * @throws Exception
+ 	 */
+ 	public File getFile() throws Exception {
+ 		return new File(m_url);
  	}
  




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.