S3Path { public void appendPath( String path ) { if( mKey == null ) mKey = path ; else if( mKey.endsWith(mDelim)) mKey = mKey + path ; else mKey = mKey + mDelim + path ; } S3Path(String	path);  S3Path( String bucket , String key );  S3Path( S3Path parent , String child ); String getBucket(); String getPrefix(); boolean hasBucket(); boolean hasKey(); String getKey(); @Override String toString(); boolean isDirectory(); void appendPath( String path ); void setBucket(String bucket); void setKey(String key); static boolean isDirectory(String key, String delim ); static boolean isDirectory(String key); static final String kDEF_DELIM; }
@Test public void testAppendPath() throws Exception { S3Path p = new S3Path("bucket","key"); p.appendPath("subkey"); assertThat("key/subkey",equalTo(p.getKey())); }