Package org.jets3t.service.impl.rest
Class XmlResponsesSaxParser
java.lang.Object
org.jets3t.service.impl.rest.XmlResponsesSaxParser
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
Nested ClassesModifier and TypeClassDescriptionclass
Handler for CreateBucketConfiguration response XML documents for a bucket.class
Handler for LoggingStatus response XML documents for a bucket.class
class
class
class
Handler for ListAllMyBuckets response XML documents.class
Handler for ListBucket response XML documents.class
class
class
class
class
class
class
class
Handler for RequestPaymentConfiguration response XML documents for a bucket.class
class
-
Constructor Summary
ConstructorsConstructorDescriptionXmlResponsesSaxParser
(Jets3tProperties properties, boolean returnGoogleStorageObjects) Constructs the XML SAX parser. -
Method Summary
Modifier and TypeMethodDescriptionparseAccessControlListResponse
(InputStream inputStream) Parses an AccessControlListHandler response XML document from an input stream.parseAccessControlListResponse
(InputStream inputStream, AccessControlListHandler handler) Parses an AccessControlListHandler response XML document from an input stream.parseBucketLocationResponse
(InputStream inputStream) parseCompleteMultipartUploadResult
(InputStream inputStream) parseCopyObjectResponse
(InputStream inputStream) parseInitiateMultipartUploadResult
(InputStream inputStream) parseListBucketResponse
(InputStream inputStream) Parses a ListBucket response XML document from an input stream.parseListMultipartPartsResult
(InputStream inputStream) parseListMultipartUploadsResult
(InputStream inputStream) parseListMyBucketsResponse
(InputStream inputStream) Parses a ListAllMyBuckets response XML document from an input stream.parseListVersionsResponse
(InputStream inputStream) parseLoggingStatusResponse
(InputStream inputStream) Parses a LoggingStatus response XML document for a bucket from an input stream.parseNotificationConfigurationResponse
(InputStream inputStream) boolean
parseRequestPaymentConfigurationResponse
(InputStream inputStream) parseVersioningConfigurationResponse
(InputStream inputStream) parseWebsiteConfigurationResponse
(InputStream inputStream)
-
Constructor Details
-
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 Details
-
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
- 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
-