Codota Logo
S3ServiceException.getMessage
Code IndexAdd Codota to your IDE (free)

How to use
getMessage
method
in
org.jets3t.service.S3ServiceException

Best Java code snippets using org.jets3t.service.S3ServiceException.getMessage (Showing top 3 results out of 315)

origin: mucommander/mucommander

protected static IOException getIOException(S3ServiceException e, FileURL fileURL) throws IOException {
  handleAuthException(e, fileURL);
  Throwable cause = e.getCause();
  if(cause instanceof IOException)
    return (IOException)cause;
  if(JavaVersion.JAVA_1_6.isCurrentOrHigher())
    return new IOException(e);
  return new IOException(e.getMessage());
}
origin: com.facebook.hadoop/hadoop-core

public FileMetadata retrieveMetadata(String key) throws IOException {
 try {
  S3Object object = s3Service.getObjectDetails(bucket, key);
  return new FileMetadata(key, object.getContentLength(),
    object.getLastModifiedDate().getTime());
 } catch (S3ServiceException e) {
  // Following is brittle. Is there a better way?
  if (e.getMessage().contains("ResponseCode=404")) {
   return null;
  }
  if (e.getCause() instanceof IOException) {
   throw (IOException) e.getCause();
  }
  throw new S3Exception(e);
 }
}

origin: org.jvnet.hudson.hadoop/hadoop-core

public FileMetadata retrieveMetadata(String key) throws IOException {
 try {
  S3Object object = s3Service.getObjectDetails(bucket, key);
  return new FileMetadata(key, object.getContentLength(),
    object.getLastModifiedDate().getTime());
 } catch (S3ServiceException e) {
  // Following is brittle. Is there a better way?
  if (e.getMessage().contains("ResponseCode=404")) {
   return null;
  }
  if (e.getCause() instanceof IOException) {
   throw (IOException) e.getCause();
  }
  throw new S3Exception(e);
 }
}

org.jets3t.serviceS3ServiceExceptiongetMessage

Popular methods of S3ServiceException

  • getCause
  • getS3ErrorCode
  • <init>
    Wrap a ServiceException as an S3ServiceException.
  • getResponseCode
  • getS3ErrorMessage
  • getErrorCode
  • getErrorHostId
  • getErrorMessage
  • getErrorRequestId
  • getResponseHeaders
  • getS3ErrorHostId
  • getS3ErrorRequestId
  • getS3ErrorHostId,
  • getS3ErrorRequestId,
  • printStackTrace,
  • setRequestHost,
  • setRequestPath,
  • setRequestVerb,
  • setResponseCode,
  • setResponseDate,
  • setResponseHeaders

Popular in Java

  • Reading from database using SQL prepared statement
  • getExternalFilesDir (Context)
  • requestLocationUpdates (LocationManager)
  • orElseThrow (Optional)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • JFileChooser (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now