Package org.jets3t.service.impl.rest
Class XmlResponsesSaxParser
- java.lang.Object
-
- org.jets3t.service.impl.rest.XmlResponsesSaxParser
-
public class XmlResponsesSaxParser extends Object
XML Sax parser to read XML documents returned by S3 via the REST interface, converting these documents into JetS3t objects.- Author:
- James Murty
-
-
Nested Class Summary
-
Constructor Summary
Constructors Constructor Description XmlResponsesSaxParser(Jets3tProperties properties, boolean returnGoogleStorageObjects)
Constructs the XML SAX parser.
-
Method Summary
-
-
-
Constructor Detail
-
XmlResponsesSaxParser
public XmlResponsesSaxParser(Jets3tProperties properties, boolean returnGoogleStorageObjects) throws ServiceException
Constructs the XML SAX parser.- Parameters:
properties
- the JetS3t properties that will be applied when parsing XML documents.- Throws:
S3ServiceException
ServiceException
-
-
Method Detail
-
parseListBucketResponse
public XmlResponsesSaxParser.ListBucketHandler parseListBucketResponse(InputStream inputStream) throws ServiceException
Parses a ListBucket response XML document from an input stream.- Parameters:
inputStream
- XML data input stream.- Returns:
- the XML handler object populated with data parsed from the XML stream.
- Throws:
ServiceException
-
parseListMyBucketsResponse
public XmlResponsesSaxParser.ListAllMyBucketsHandler parseListMyBucketsResponse(InputStream inputStream) throws ServiceException
Parses a ListAllMyBuckets response XML document from an input stream.- Parameters:
inputStream
- XML data input stream.- Returns:
- the XML handler object populated with data parsed from the XML stream.
- Throws:
ServiceException
-
parseAccessControlListResponse
public AccessControlListHandler parseAccessControlListResponse(InputStream inputStream) throws ServiceException
Parses an AccessControlListHandler response XML document from an input stream.- Parameters:
inputStream
- XML data input stream.- Returns:
- the XML handler object populated with data parsed from the XML stream.
- Throws:
ServiceException
-
parseAccessControlListResponse
public AccessControlListHandler parseAccessControlListResponse(InputStream inputStream, AccessControlListHandler handler) throws ServiceException
Parses an AccessControlListHandler response XML document from an input stream.- Parameters:
inputStream
- XML data input stream.handler
- the instance of AccessControlListHandler to be used.- Returns:
- the XML handler object populated with data parsed from the XML stream.
- Throws:
ServiceException
-
parseLoggingStatusResponse
public XmlResponsesSaxParser.BucketLoggingStatusHandler parseLoggingStatusResponse(InputStream inputStream) throws ServiceException
Parses a LoggingStatus response XML document for a bucket from an input stream.- Parameters:
inputStream
- XML data input stream.- Returns:
- the XML handler object populated with data parsed from the XML stream.
- Throws:
ServiceException
-
parseBucketLocationResponse
public String parseBucketLocationResponse(InputStream inputStream) throws ServiceException
- Throws:
ServiceException
-
parseCopyObjectResponse
public XmlResponsesSaxParser.CopyObjectResultHandler parseCopyObjectResponse(InputStream inputStream) throws ServiceException
- Throws:
ServiceException
-
parseRequestPaymentConfigurationResponse
public boolean parseRequestPaymentConfigurationResponse(InputStream inputStream) throws ServiceException
- Parameters:
inputStream
-- Returns:
- true if the bucket is configured as Requester Pays, false if it is configured as Owner pays.
- Throws:
ServiceException
-
parseVersioningConfigurationResponse
public S3BucketVersioningStatus parseVersioningConfigurationResponse(InputStream inputStream) throws ServiceException
- Parameters:
inputStream
-- Returns:
- true if the bucket has versioning enabled, false otherwise.
- Throws:
ServiceException
-
parseListVersionsResponse
public XmlResponsesSaxParser.ListVersionsResultsHandler parseListVersionsResponse(InputStream inputStream) throws ServiceException
- Throws:
ServiceException
-
parseInitiateMultipartUploadResult
public MultipartUpload parseInitiateMultipartUploadResult(InputStream inputStream) throws ServiceException
- Throws:
ServiceException
-
parseListMultipartUploadsResult
public XmlResponsesSaxParser.ListMultipartUploadsResultHandler parseListMultipartUploadsResult(InputStream inputStream) throws ServiceException
- Throws:
ServiceException
-
parseListMultipartPartsResult
public XmlResponsesSaxParser.ListMultipartPartsResultHandler parseListMultipartPartsResult(InputStream inputStream) throws ServiceException
- Throws:
ServiceException
-
parseCompleteMultipartUploadResult
public XmlResponsesSaxParser.CompleteMultipartUploadResultHandler parseCompleteMultipartUploadResult(InputStream inputStream) throws ServiceException
- Throws:
ServiceException
-
parseWebsiteConfigurationResponse
public WebsiteConfig parseWebsiteConfigurationResponse(InputStream inputStream) throws ServiceException
- Throws:
ServiceException
-
parseNotificationConfigurationResponse
public NotificationConfig parseNotificationConfigurationResponse(InputStream inputStream) throws ServiceException
- Throws:
ServiceException
-
-