Skip to content

Commit

Permalink
Switching from google http client to apache http client
Browse files Browse the repository at this point in the history
  • Loading branch information
fkautz committed May 10, 2015
1 parent e188ec8 commit 8278998
Show file tree
Hide file tree
Showing 7 changed files with 630 additions and 488 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ apply plugin: 'pmd'

ext.junitVersion = '4.12'
ext.googleHttpClientVersion = '1.20.0'
ext.apacheHttpClientVersion = '4.4.1'

task wrapper(type: Wrapper) {
gradleVersion = '2.3'
Expand All @@ -28,6 +29,7 @@ task wrapper(type: Wrapper) {
dependencies {
compile group: 'com.google.http-client', name: 'google-http-client', version: googleHttpClientVersion
compile group: 'com.google.http-client', name: 'google-http-client-xml', version: googleHttpClientVersion
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: apacheHttpClientVersion

testCompile group: 'junit', name: 'junit', version: junitVersion
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Sat May 02 19:44:35 PDT 2015
#Sat May 09 23:00:30 PDT 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Expand Down
18 changes: 10 additions & 8 deletions src/main/java/io/minio/objectstorage/client/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@

import java.io.IOException;
import java.io.InputStream;
import java.net.URISyntaxException;
import java.net.URL;
import java.text.ParseException;

public interface Client {
public static String ACL_PRIVATE = "private";
Expand All @@ -34,20 +36,20 @@ public interface Client {

URL getUrl();

InputStream getObject(String bucket, String key) throws IOException;
InputStream getObject(String bucket, String key) throws IOException, ParseException, URISyntaxException;

InputStream getObject(String bucket, String key, long offset, long length) throws IOException;
InputStream getObject(String bucket, String key, long offset, long length) throws IOException, URISyntaxException;

ObjectMetadata getObjectMetadata(String bucket, String key) throws IOException;
ObjectMetadata getObjectMetadata(String bucket, String key) throws IOException, ParseException, URISyntaxException;

ListAllMyBucketsResult listBuckets() throws IOException, XmlPullParserException;
ListAllMyBucketsResult listBuckets() throws IOException, XmlPullParserException, URISyntaxException;

ListBucketResult listObjectsInBucket(String bucket) throws IOException, XmlPullParserException;
ListBucketResult listObjectsInBucket(String bucket) throws IOException, XmlPullParserException, URISyntaxException;

boolean testBucketAccess(String bucket) throws IOException;
boolean testBucketAccess(String bucket) throws IOException, URISyntaxException;

boolean createBucket(String bucket, String acl) throws IOException;
boolean createBucket(String bucket, String acl) throws IOException, URISyntaxException;

void createObject(String bucket, String key, String contentType, long size, InputStream data) throws IOException, XmlPullParserException;
void createObject(String bucket, String key, String contentType, long size, InputStream data) throws IOException, XmlPullParserException, URISyntaxException;
}

Loading

0 comments on commit 8278998

Please sign in to comment.