Class DataConnection
- java.lang.Object
-
- java.net.URLConnection
-
- org.openstreetmap.josm.io.protocols.data.DataConnection
-
public class DataConnection extends URLConnection
Connection for "data:" protocol allowing to read inlined base64 images.See StackOverflow.
- Since:
- 10931
-
-
Field Summary
-
Fields inherited from class java.net.URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
-
-
Constructor Summary
Constructors Constructor Description DataConnection(URL u)
Constructs a newDataConnection
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connect()
InputStream
getInputStream()
-
Methods inherited from class java.net.URLConnection
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLength, getContentLengthLong, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFieldLong, getHeaderFields, getIfModifiedSince, getLastModified, getOutputStream, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toString
-
-
-
-
Constructor Detail
-
DataConnection
public DataConnection(URL u)
Constructs a newDataConnection
.- Parameters:
u
- data url
-
-
Method Detail
-
connect
public void connect() throws IOException
- Specified by:
connect
in classURLConnection
- Throws:
IOException
-
getInputStream
public InputStream getInputStream() throws IOException
- Overrides:
getInputStream
in classURLConnection
- Throws:
IOException
-
-