Tabnine Logo
S3ServiceException.getMessage
Code IndexAdd Tabnine 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

  • Finding current android device location
  • getExternalFilesDir (Context)
  • getResourceAsStream (ClassLoader)
  • getSupportFragmentManager (FragmentActivity)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • JPanel (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now