当前位置: 首页>>代码示例>>Java>>正文


Java XmlResponsesSaxParser类代码示例

本文整理汇总了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;
}
 
开发者ID:fajoy,项目名称:jets3t,代码行数:19,代码来源:RestS3Service.java

示例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();
}
 
开发者ID:fajoy,项目名称:jets3t,代码行数:13,代码来源:RestS3Service.java

示例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();
}
 
开发者ID:fajoy,项目名称:jets3t,代码行数:13,代码来源:RestS3Service.java

示例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));        
}
 
开发者ID:fajoy,项目名称:jets3t,代码行数:15,代码来源:RestS3Service.java

示例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();        
}
 
开发者ID:fajoy,项目名称:jets3t,代码行数:15,代码来源:RestS3Service.java

示例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();
}
 
开发者ID:fajoy,项目名称:jets3t,代码行数:25,代码来源:RestS3Service.java

示例7: getXmlResponseSaxParser

import org.jets3t.service.impl.rest.XmlResponsesSaxParser; //导入依赖的package包/类
protected XmlResponsesSaxParser getXmlResponseSaxParser() throws ServiceException {
    return new XmlResponsesSaxParser(client.getJetS3tProperties(), false);
}
 
开发者ID:iterate-ch,项目名称:cyberduck,代码行数:4,代码来源:S3Session.java

示例8: getXmlResponseSaxParser

import org.jets3t.service.impl.rest.XmlResponsesSaxParser; //导入依赖的package包/类
@Override
protected XmlResponsesSaxParser getXmlResponseSaxParser() throws ServiceException {
    return session.getXmlResponseSaxParser();
}
 
开发者ID:iterate-ch,项目名称:cyberduck,代码行数:5,代码来源:RequestEntityRestStorageService.java

示例9: getXmlResponseSaxParser

import org.jets3t.service.impl.rest.XmlResponsesSaxParser; //导入依赖的package包/类
@Override
protected XmlResponsesSaxParser getXmlResponseSaxParser() throws ServiceException {
    return new XmlResponsesSaxParser(this.jets3tProperties, true);
}
 
开发者ID:guptavishal,项目名称:jets3t-aws-roles,代码行数:5,代码来源:GoogleStorageService.java

示例10: getXmlResponseSaxParser

import org.jets3t.service.impl.rest.XmlResponsesSaxParser; //导入依赖的package包/类
@Override
protected XmlResponsesSaxParser getXmlResponseSaxParser() throws ServiceException {
    return new XmlResponsesSaxParser(this.jets3tProperties, false);
}
 
开发者ID:guptavishal,项目名称:jets3t-aws-roles,代码行数:5,代码来源:RestS3Service.java

示例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;
 
开发者ID:guptavishal,项目名称:jets3t-aws-roles,代码行数:7,代码来源:StorageService.java


注:本文中的org.jets3t.service.impl.rest.XmlResponsesSaxParser类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。