@Override public PartialListing list(String prefix, int maxListingLength) throws IOException { return list(prefix, maxListingLength, null, false); }
/** * Handle any service exception by translating it into an IOException * @param e exception * @throws IOException exception -always */ private void handleException(Exception e) throws IOException { throw processException(e, e, ""); } /**
@Override NativeFileSystemStore getNativeFileSystemStore() throws IOException { return new Jets3tNativeFileSystemStore(); } }
private void createParent(Path path) throws IOException { Path parent = path.getParent(); if (parent != null) { String key = pathToKey(makeAbsolute(parent)); if (key.length() > 0) { store.storeEmptyFile(key + FOLDER_SUFFIX); } } }
private void createTestFiles(String base) throws IOException { store.storeEmptyFile(base + "/file1"); store.storeEmptyFile(base + "/dir/file2"); store.storeEmptyFile(base + "/dir/file3"); }
/** * Reopen a new input stream with the specified position * @param pos the position to reopen a new stream * @throws IOException */ private synchronized void reopen(long pos) throws IOException { LOG.debug("Reopening key '{}' for reading at position '{}", key, pos); InputStream newStream = store.retrieve(key, pos); updateInnerStream(newStream, pos); }
/** * Extract the login details from a URI, raising an exception if * the URI contains them. * @param name URI of the filesystem, can be null * @throws IllegalArgumentException if there is a secret in the URI. */ public static void rejectSecretsInURIs(URI name) { Login login = extractLoginDetails(name); Preconditions.checkArgument(!login.hasLogin(), LOGIN_WARNING); }
public PartialListing list(String prefix, int maxListingLength, String priorLastKey, boolean recursive) throws IOException { return list(prefix, recursive ? null : PATH_DELIMITER, maxListingLength, priorLastKey); }
@Override public synchronized void close() throws IOException { closeInnerStream(); }
@Override NativeFileSystemStore getNativeFileSystemStore() throws IOException { return new InMemoryNativeFileSystemStore(); } }
public InputStream retrieve(String key) throws IOException { return retrieve(key, 0); }
@Override public PartialListing list(String prefix, int maxListingLength, String priorLastKey, boolean recurse) throws IOException { return list(prefix, recurse ? null : PATH_DELIMITER, maxListingLength, priorLastKey); }
/** * Handle any service exception by translating it into an IOException * @param e exception * @param key key sought from object store * @throws IOException exception -always */ private void handleException(Exception e, String key) throws IOException { throw processException(e, e, key); }
public PartialListing list(String prefix, int maxListingLength) throws IOException { return list(prefix, maxListingLength, null, false); }
public PartialListing list(String prefix, int maxListingLength) throws IOException { return list(prefix, maxListingLength, null); }
public PartialListing list(String prefix, int maxListingLength) throws IOException { return list(prefix, maxListingLength, null); }
public PartialListing list(String prefix, int maxListingLength, String priorLastKey) throws IOException { return list(prefix, PATH_DELIMITER, maxListingLength, priorLastKey); }
public PartialListing list(String prefix, int maxListingLength, String priorLastKey) throws IOException { return list(prefix, PATH_DELIMITER, maxListingLength, priorLastKey); }
public PartialListing listAll(String prefix, int maxListingLength, String priorLastKey) throws IOException { return list(prefix, null, maxListingLength, priorLastKey); }
public PartialListing listAll(String prefix, int maxListingLength, String priorLastKey) throws IOException { return list(prefix, null, maxListingLength, priorLastKey); }