Class UrlLoader
- java.lang.Object
-
- org.apache.felix.utils.repository.UrlLoader
-
- Direct Known Subclasses:
XmlRepository.XmlLoader
public abstract class UrlLoader extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.lang.String
alphabet
private long
expiration
static java.lang.String
GZIP
static java.lang.String
HEADER_ACCEPT_ENCODING
private long
lastChecked
private long
lastModified
private java.lang.String
url
-
Constructor Summary
Constructors Constructor Description UrlLoader(java.lang.String url, long expiration)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected static java.lang.String
base64(byte[] in)
protected boolean
checkAndLoadCache()
private boolean
didNotChange(java.net.URLConnection connection)
protected abstract boolean
doRead(java.io.InputStream is)
java.lang.String
getUrl()
private boolean
isGzipStream(java.io.InputStream is)
private boolean
read(java.net.URLConnection connection)
-
-
-
Field Detail
-
HEADER_ACCEPT_ENCODING
public static final java.lang.String HEADER_ACCEPT_ENCODING
- See Also:
- Constant Field Values
-
GZIP
public static final java.lang.String GZIP
- See Also:
- Constant Field Values
-
url
private final java.lang.String url
-
expiration
private final long expiration
-
lastModified
private long lastModified
-
lastChecked
private long lastChecked
-
alphabet
static final java.lang.String alphabet
- See Also:
- Constant Field Values
-
-
Method Detail
-
getUrl
public java.lang.String getUrl()
-
checkAndLoadCache
protected boolean checkAndLoadCache()
-
didNotChange
private boolean didNotChange(java.net.URLConnection connection)
-
read
private boolean read(java.net.URLConnection connection) throws java.io.IOException
- Throws:
java.io.IOException
-
isGzipStream
private boolean isGzipStream(java.io.InputStream is) throws java.io.IOException
- Throws:
java.io.IOException
-
doRead
protected abstract boolean doRead(java.io.InputStream is) throws java.io.IOException
- Throws:
java.io.IOException
-
base64
protected static java.lang.String base64(byte[] in)
-
-