mirror of
https://github.com/corda/corda.git
synced 2025-01-22 12:28:11 +00:00
add URLConnection methods
This commit is contained in:
parent
2e86f0ac57
commit
dd52908f89
@ -16,6 +16,9 @@ import java.io.OutputStream;
|
||||
|
||||
public abstract class URLConnection {
|
||||
protected final URL url;
|
||||
protected boolean doInput = true;
|
||||
protected boolean doOutput = false;
|
||||
protected boolean useCaches = true;
|
||||
|
||||
protected URLConnection(URL url) {
|
||||
this.url = url;
|
||||
@ -29,6 +32,8 @@ public abstract class URLConnection {
|
||||
return -1;
|
||||
}
|
||||
|
||||
public abstract void connect() throws IOException;
|
||||
|
||||
public InputStream getInputStream() throws IOException {
|
||||
throw new UnknownServiceException();
|
||||
}
|
||||
@ -36,4 +41,24 @@ public abstract class URLConnection {
|
||||
public OutputStream getOutputStream() throws IOException {
|
||||
throw new UnknownServiceException();
|
||||
}
|
||||
|
||||
public boolean getDoInput() {
|
||||
return doInput;
|
||||
}
|
||||
|
||||
public boolean getDoOutput() {
|
||||
return doOutput;
|
||||
}
|
||||
|
||||
public void setDoInput(boolean v) {
|
||||
doInput = v;
|
||||
}
|
||||
|
||||
public void setDoOutput(boolean v) {
|
||||
doInput = v;
|
||||
}
|
||||
|
||||
public void setUseCaches(boolean v) {
|
||||
useCaches = v;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user