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

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: org.jvnet.hudson.hadoop/hadoop-core

private void createBucket(String bucketName) throws IOException {
 try {
  s3Service.createBucket(bucketName);
 } catch (S3ServiceException e) {
  if (e.getCause() instanceof IOException) {
   throw (IOException) e.getCause();
  }
  throw new S3Exception(e);
 }
}

origin: com.facebook.hadoop/hadoop-core

public void delete(String key) throws IOException {
 try {
  s3Service.deleteObject(bucket, key);
 } catch (S3ServiceException e) {
  if (e.getCause() instanceof IOException) {
   throw (IOException) e.getCause();
  }
  throw new S3Exception(e);
 }
}

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

private void delete(String key) throws IOException {
 try {
  s3Service.deleteObject(bucket, key);
 } catch (S3ServiceException e) {
  if (e.getCause() instanceof IOException) {
   throw (IOException) e.getCause();
  }
  throw new S3Exception(e);
 }
}
origin: ch.cern.hadoop/hadoop-aws

private void delete(String key) throws IOException {
 try {
  s3Service.deleteObject(bucket, key);
 } catch (S3ServiceException e) {
  if (e.getCause() instanceof IOException) {
   throw (IOException) e.getCause();
  }
  throw new S3Exception(e);
 }
}

origin: com.facebook.hadoop/hadoop-core

private void delete(String key) throws IOException {
 try {
  s3Service.deleteObject(bucket, key);
 } catch (S3ServiceException e) {
  if (e.getCause() instanceof IOException) {
   throw (IOException) e.getCause();
  }
  throw new S3Exception(e);
 }
}
origin: org.jvnet.hudson.hadoop/hadoop-core

private void createBucket(String bucketName) throws IOException {
 try {
  s3Service.createBucket(bucketName);
 } catch (S3ServiceException e) {
  if (e.getCause() instanceof IOException) {
   throw (IOException) e.getCause();
  }
  throw new S3Exception(e);
 }
}

origin: com.facebook.hadoop/hadoop-core

private void delete(String key) throws IOException {
 try {
  s3Service.deleteObject(bucket, key);
 } catch (S3ServiceException e) {
  if (e.getCause() instanceof IOException) {
   throw (IOException) e.getCause();
  }
  throw new S3Exception(e);
 }
}

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

private void delete(String key) throws IOException {
 try {
  s3Service.deleteObject(bucket, key);
 } catch (S3ServiceException e) {
  if (e.getCause() instanceof IOException) {
   throw (IOException) e.getCause();
  }
  throw new S3Exception(e);
 }
}

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

public void delete(String key) throws IOException {
 try {
  s3Service.deleteObject(bucket, key);
 } catch (S3ServiceException e) {
  if (e.getCause() instanceof IOException) {
   throw (IOException) e.getCause();
  }
  throw new S3Exception(e);
 }
}

origin: ch.cern.hadoop/hadoop-aws

private void delete(String key) throws IOException {
 try {
  s3Service.deleteObject(bucket, key);
 } catch (S3ServiceException e) {
  if (e.getCause() instanceof IOException) {
   throw (IOException) e.getCause();
  }
  throw new S3Exception(e);
 }
}
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: org.jvnet.hudson.hadoop/hadoop-core

public InputStream retrieve(String key) throws IOException {
 try {
  S3Object object = s3Service.getObject(bucket, key);
  return object.getDataInputStream();
 } catch (S3ServiceException e) {
  if ("NoSuchKey".equals(e.getS3ErrorCode())) {
   return null;
  }
  if (e.getCause() instanceof IOException) {
   throw (IOException) e.getCause();
  }
  throw new S3Exception(e);
 }
}

origin: com.facebook.hadoop/hadoop-core

private InputStream get(String key) throws IOException {
 try {
  S3Object object = s3Service.getObject(bucket, key);
  return object.getDataInputStream();
 } catch (S3ServiceException e) {
  if ("NoSuchKey".equals(e.getS3ErrorCode())) {
   return null;
  }
  if (e.getCause() instanceof IOException) {
   throw (IOException) e.getCause();
  }
  throw new S3Exception(e);
 }
}

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

public void purge(String prefix) throws IOException {
 try {
  S3Object[] objects = s3Service.listObjects(bucket, prefix, null);
  for (int i = 0; i < objects.length; i++) {
   s3Service.deleteObject(bucket, objects[i].getKey());
  }
 } catch (S3ServiceException e) {
  if (e.getCause() instanceof IOException) {
   throw (IOException) e.getCause();
  }
  throw new S3Exception(e);
 }
}
origin: com.facebook.hadoop/hadoop-core

public void purge(String prefix) throws IOException {
 try {
  S3Object[] objects = s3Service.listObjects(bucket, prefix, null);
  for (int i = 0; i < objects.length; i++) {
   s3Service.deleteObject(bucket, objects[i].getKey());
  }
 } catch (S3ServiceException e) {
  if (e.getCause() instanceof IOException) {
   throw (IOException) e.getCause();
  }
  throw new S3Exception(e);
 }
}
origin: com.facebook.hadoop/hadoop-core

public void purge() throws IOException {
 try {
  S3Object[] objects = s3Service.listObjects(bucket);
  for (int i = 0; i < objects.length; i++) {
   s3Service.deleteObject(bucket, objects[i].getKey());
  }
 } catch (S3ServiceException e) {
  if (e.getCause() instanceof IOException) {
   throw (IOException) e.getCause();
  }
  throw new S3Exception(e);
 }
}
origin: org.jvnet.hudson.hadoop/hadoop-core

public void purge() throws IOException {
 try {
  S3Object[] objects = s3Service.listObjects(bucket);
  for (int i = 0; i < objects.length; i++) {
   s3Service.deleteObject(bucket, objects[i].getKey());
  }
 } catch (S3ServiceException e) {
  if (e.getCause() instanceof IOException) {
   throw (IOException) e.getCause();
  }
  throw new S3Exception(e);
 }
}
origin: com.facebook.hadoop/hadoop-core

public void rename(String srcKey, String dstKey) throws IOException {
 try {
  s3Service.moveObject(bucket.getName(), srcKey, bucket.getName(),
    new S3Object(dstKey), false);
 } catch (S3ServiceException e) {
  if (e.getCause() instanceof IOException) {
   throw (IOException) e.getCause();
  }
  throw new S3Exception(e);
 }
}
origin: org.jvnet.hudson.hadoop/hadoop-core

public void rename(String srcKey, String dstKey) throws IOException {
 try {
  s3Service.moveObject(bucket.getName(), srcKey, bucket.getName(),
    new S3Object(dstKey), false);
 } catch (S3ServiceException e) {
  if (e.getCause() instanceof IOException) {
   throw (IOException) e.getCause();
  }
  throw new S3Exception(e);
 }
}
origin: org.jvnet.hudson.hadoop/hadoop-core

public void storeEmptyFile(String key) throws IOException {
 try {
  S3Object object = new S3Object(key);
  object.setDataInputStream(new ByteArrayInputStream(new byte[0]));
  object.setContentType("binary/octet-stream");
  object.setContentLength(0);
  s3Service.putObject(bucket, object);
 } catch (S3ServiceException e) {
  if (e.getCause() instanceof IOException) {
   throw (IOException) e.getCause();
  }
  throw new S3Exception(e);
 }
}

org.jets3t.serviceS3ServiceExceptiongetCause

Popular methods of S3ServiceException

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

Popular in Java

  • Making http requests using okhttp
  • putExtra (Intent)
  • setContentView (Activity)
  • findViewById (Activity)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
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