diff options
author | olamedia <[email protected]> | 2012-09-28 18:46:42 +0600 |
---|---|---|
committer | olamedia <[email protected]> | 2012-09-28 18:46:42 +0600 |
commit | b4192c7a88bad111bebbd42d391d6e729c8617d6 (patch) | |
tree | b05a586dbc60c5427fcc7f3fe01cf2fdcb970272 /src/ru/olamedia/asset/Asset.java |
initial
Diffstat (limited to 'src/ru/olamedia/asset/Asset.java')
-rw-r--r-- | src/ru/olamedia/asset/Asset.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/ru/olamedia/asset/Asset.java b/src/ru/olamedia/asset/Asset.java new file mode 100644 index 0000000..a420c10 --- /dev/null +++ b/src/ru/olamedia/asset/Asset.java @@ -0,0 +1,29 @@ +package ru.olamedia.asset; + +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; + +public class Asset { + protected URL url; + + public boolean inJar() { + return url.toString().startsWith("file:jar:"); + } + + public Asset(URL url) { + this.url = url; + } + + public URL getURL() { + return url; + } + + public InputStream getInputStream() throws IOException { + return url.openStream(); + } + + public String getFile() { + return url.getFile(); + } +} |