本文整理汇总了Java中org.jets3t.service.impl.rest.XmlResponsesSaxParser类的典型用法代码示例。如果您正苦于以下问题:Java XmlResponsesSaxParser类的具体用法?Java XmlResponsesSaxParser怎么用?Java XmlResponsesSaxParser使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
XmlResponsesSaxParser类属于org.jets3t.service.impl.rest包,在下文中一共展示了XmlResponsesSaxParser类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: listAllBucketsImpl
import org.jets3t.service.impl.rest.XmlResponsesSaxParser; //导入依赖的package包/类
protected S3Bucket[] listAllBucketsImpl() throws S3ServiceException {
if (log.isDebugEnabled()) {
log.debug("Listing all buckets for AWS user: " + getAWSCredentials().getAccessKey());
}
String bucketName = ""; // Root path of S3 service lists the user's buckets.
HttpMethodBase httpMethod = performRestGet(bucketName, null, null, null);
String contentType = httpMethod.getResponseHeader("Content-Type").getValue();
if (!Mimetypes.MIMETYPE_XML.equals(contentType)) {
throw new S3ServiceException("Expected XML document response from S3 but received content type " +
contentType);
}
S3Bucket[] buckets = (new XmlResponsesSaxParser()).parseListMyBucketsResponse(
new HttpMethodReleaseInputStream(httpMethod)).getBuckets();
return buckets;
}
示例2: getObjectAclImpl
import org.jets3t.service.impl.rest.XmlResponsesSaxParser; //导入依赖的package包/类
protected AccessControlList getObjectAclImpl(String bucketName, String objectKey) throws S3ServiceException {
if (log.isDebugEnabled()) {
log.debug("Retrieving Access Control List for bucketName=" + bucketName + ", objectKkey=" + objectKey);
}
HashMap requestParameters = new HashMap();
requestParameters.put("acl","");
HttpMethodBase httpMethod = performRestGet(bucketName, objectKey, requestParameters, null);
return (new XmlResponsesSaxParser()).parseAccessControlListResponse(
new HttpMethodReleaseInputStream(httpMethod)).getAccessControlList();
}
示例3: getBucketAclImpl
import org.jets3t.service.impl.rest.XmlResponsesSaxParser; //导入依赖的package包/类
protected AccessControlList getBucketAclImpl(String bucketName) throws S3ServiceException {
if (log.isDebugEnabled()) {
log.debug("Retrieving Access Control List for Bucket: " + bucketName);
}
HashMap requestParameters = new HashMap();
requestParameters.put("acl","");
HttpMethodBase httpMethod = performRestGet(bucketName, null, requestParameters, null);
return (new XmlResponsesSaxParser()).parseAccessControlListResponse(
new HttpMethodReleaseInputStream(httpMethod)).getAccessControlList();
}
示例4: getBucketLocationImpl
import org.jets3t.service.impl.rest.XmlResponsesSaxParser; //导入依赖的package包/类
protected String getBucketLocationImpl(String bucketName)
throws S3ServiceException
{
if (log.isDebugEnabled()) {
log.debug("Retrieving location of Bucket: " + bucketName);
}
HashMap requestParameters = new HashMap();
requestParameters.put("location","");
HttpMethodBase httpMethod = performRestGet(bucketName, null, requestParameters, null);
return (new XmlResponsesSaxParser()).parseBucketLocationResponse(
new HttpMethodReleaseInputStream(httpMethod));
}
示例5: getBucketLoggingStatusImpl
import org.jets3t.service.impl.rest.XmlResponsesSaxParser; //导入依赖的package包/类
protected S3BucketLoggingStatus getBucketLoggingStatusImpl(String bucketName)
throws S3ServiceException
{
if (log.isDebugEnabled()) {
log.debug("Retrieving Logging Status for Bucket: " + bucketName);
}
HashMap requestParameters = new HashMap();
requestParameters.put("logging","");
HttpMethodBase httpMethod = performRestGet(bucketName, null, requestParameters, null);
return (new XmlResponsesSaxParser()).parseLoggingStatusResponse(
new HttpMethodReleaseInputStream(httpMethod)).getBucketLoggingStatus();
}
示例6: getObjectAclWithSignedUrl
import org.jets3t.service.impl.rest.XmlResponsesSaxParser; //导入依赖的package包/类
/**
* Gets an object's ACL details using a pre-signed GET URL generated for that object.
* This method is an implementation of the interface {@link SignedUrlHandler}.
*
* @param signedAclUrl
* a signed URL generated with {@link S3Service#createSignedUrl(String, String, String, String, Map, AWSCredentials, long, boolean)}.
*
* @return
* the AccessControlList settings of the object in S3.
*
* @throws S3ServiceException
*/
public AccessControlList getObjectAclWithSignedUrl(String signedAclUrl)
throws S3ServiceException
{
HttpMethodBase httpMethod = new GetMethod(signedAclUrl);
HashMap requestParameters = new HashMap();
requestParameters.put("acl","");
performRequest(httpMethod, 200);
return (new XmlResponsesSaxParser()).parseAccessControlListResponse(
new HttpMethodReleaseInputStream(httpMethod)).getAccessControlList();
}
示例7: getXmlResponseSaxParser
import org.jets3t.service.impl.rest.XmlResponsesSaxParser; //导入依赖的package包/类
protected XmlResponsesSaxParser getXmlResponseSaxParser() throws ServiceException {
return new XmlResponsesSaxParser(client.getJetS3tProperties(), false);
}
示例8: getXmlResponseSaxParser
import org.jets3t.service.impl.rest.XmlResponsesSaxParser; //导入依赖的package包/类
@Override
protected XmlResponsesSaxParser getXmlResponseSaxParser() throws ServiceException {
return session.getXmlResponseSaxParser();
}
示例9: getXmlResponseSaxParser
import org.jets3t.service.impl.rest.XmlResponsesSaxParser; //导入依赖的package包/类
@Override
protected XmlResponsesSaxParser getXmlResponseSaxParser() throws ServiceException {
return new XmlResponsesSaxParser(this.jets3tProperties, true);
}
示例10: getXmlResponseSaxParser
import org.jets3t.service.impl.rest.XmlResponsesSaxParser; //导入依赖的package包/类
@Override
protected XmlResponsesSaxParser getXmlResponseSaxParser() throws ServiceException {
return new XmlResponsesSaxParser(this.jets3tProperties, false);
}
示例11: getXmlResponseSaxParser
import org.jets3t.service.impl.rest.XmlResponsesSaxParser; //导入依赖的package包/类
/**
* @return
* an XML SAX Parser capable of parsing responses from the implemented storage service.
* @throws ServiceException
*/
protected abstract XmlResponsesSaxParser getXmlResponseSaxParser() throws ServiceException;