Marcel Offermans | 8b93efa | 2010-07-02 18:27:21 +0000 | [diff] [blame^] | 1 | package org.apache.felix.dm; |
Marcel Offermans | a8c213f | 2010-07-02 17:27:20 +0000 | [diff] [blame] | 2 | |
| 3 | import java.net.URL; |
| 4 | import java.util.Dictionary; |
| 5 | import java.util.Properties; |
| 6 | |
| 7 | public class ResourceUtil { |
| 8 | public static Dictionary createProperties(URL url) { |
| 9 | Properties props = new Properties(); |
| 10 | props.setProperty(ResourceHandler.PROTOCOL, url.getProtocol()); |
| 11 | props.setProperty(ResourceHandler.HOST, url.getHost()); |
| 12 | props.setProperty(ResourceHandler.PORT, Integer.toString(url.getPort())); |
| 13 | props.setProperty(ResourceHandler.PATH, url.getPath()); |
| 14 | return props; |
| 15 | } |
| 16 | } |