@Test public void key2Parts() { S3FileSystemProvider provider = new S3FileSystemProvider(); AmazonS3ClientMock amazonClientMock = AmazonS3MockFactory.getAmazonClientMock(); S3FileSystem s3fs = new S3FileSystem(provider, null, amazonClientMock, "mirror1.amazon.test"); try { String[] parts = s3fs.key2Parts("/bucket/folder with spaces/file"); assertEquals("", parts[0]); assertEquals("bucket", parts[1]); assertEquals("folder with spaces", parts[2]); assertEquals("file", parts[3]); } finally { try { s3fs.close(); } catch (IOException e) { } } }
public String[] key2Parts(String keyParts) { String[] parts = keyParts.split(PATH_SEPARATOR); String[] split = new String[parts.length]; int i = 0; for (String part : parts) { split[i++] = part; } return split; }
S3FileSystem extends FileSystem implements Comparable<S3FileSystem> { public String[] key2Parts(String keyParts) { String[] parts = keyParts.split(PATH_SEPARATOR); String[] split = new String[parts.length]; int i = 0; for (String part : parts) { split[i++] = part; } return split; } }
S3FileSystem extends FileSystem implements Comparable<S3FileSystem> { public String[] key2Parts(String keyParts) { String[] parts = keyParts.split(PATH_SEPARATOR); String[] split = new String[parts.length]; int i = 0; for (String part : parts) { split[i++] = part; } return split; } S3FileSystem(S3FileSystemProvider provider, String key, AmazonS3 client, String endpoint); }
S3FileSystem extends FileSystem implements Comparable<S3FileSystem> { public String[] key2Parts(String keyParts) { String[] parts = keyParts.split(PATH_SEPARATOR); String[] split = new String[parts.length]; int i = 0; for (String part : parts) { split[i++] = part; } return split; } S3FileSystem(S3FileSystemProvider provider, String key, AmazonS3 client, String endpoint); @Override S3FileSystemProvider provider(); String getKey(); @Override void close(); @Override boolean isOpen(); @Override boolean isReadOnly(); @Override String getSeparator(); @Override Iterable<Path> getRootDirectories(); @Override Iterable<FileStore> getFileStores(); @Override Set<String> supportedFileAttributeViews(); @Override S3Path getPath(String first, String... more); @Override PathMatcher getPathMatcher(String syntaxAndPattern); @Override UserPrincipalLookupService getUserPrincipalLookupService(); @Override WatchService newWatchService(); AmazonS3 getClient(); String getEndpoint(); String[] key2Parts(String keyParts); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(S3FileSystem o); int getCache(); }
S3FileSystem extends FileSystem implements Comparable<S3FileSystem> { public String[] key2Parts(String keyParts) { String[] parts = keyParts.split(PATH_SEPARATOR); String[] split = new String[parts.length]; int i = 0; for (String part : parts) { split[i++] = part; } return split; } S3FileSystem(S3FileSystemProvider provider, String key, AmazonS3 client, String endpoint); @Override S3FileSystemProvider provider(); String getKey(); @Override void close(); @Override boolean isOpen(); @Override boolean isReadOnly(); @Override String getSeparator(); @Override Iterable<Path> getRootDirectories(); @Override Iterable<FileStore> getFileStores(); @Override Set<String> supportedFileAttributeViews(); @Override S3Path getPath(String first, String... more); @Override PathMatcher getPathMatcher(String syntaxAndPattern); @Override UserPrincipalLookupService getUserPrincipalLookupService(); @Override WatchService newWatchService(); AmazonS3 getClient(); String getEndpoint(); String[] key2Parts(String keyParts); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(S3FileSystem o); int getCache();  }