Skip to content

Commit 0bef38d

Browse files
committed
Minor javadoc fixes to gcloud-java-nio
1 parent 2b28ee3 commit 0bef38d

File tree

16 files changed

+59
-76
lines changed

16 files changed

+59
-76
lines changed

gcloud-java-contrib/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Contents
1313
--------
1414

1515
* [gcloud-java-nio](./gcloud-java-nio/): NIO Filesystem Provider for Google Cloud Storage.
16-
* [gcloud-java-nio-examples](./gcloud-java-nio-examples/): How to add GCS NIO after the fact.
16+
* [gcloud-java-nio-examples](./gcloud-java-nio-examples/): How to add Google Cloud Storage NIO after the fact.
1717

1818
Quickstart
1919
----------

gcloud-java-contrib/gcloud-java-nio-examples/README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Example of adding the Google Cloud Storage NIO Provider to a legacy jar
22
=======================================================================
33

4-
This project shows how to add GCS capabilities to a jar file for a Java 7 application
5-
that uses Java NIO without the need to recompile.
4+
This project shows how to add Google Cloud Storage capabilities to a jar file for a Java 7
5+
application that uses Java NIO without the need to recompile.
66

77
Note that whenever possible, you instead want to recompile the app and use the normal
88
dependency mechanism to add a dependency to gcloud-java-nio. You can see examples of
@@ -25,19 +25,20 @@ To run this example:
2525
java -cp gcloud-java-contrib/gcloud-java-nio/target/gcloud-java-nio-0.2.5-SNAPSHOT-shaded.jar:gcloud-java-contrib/gcloud-java-nio-examples/target/gcloud-java-nio-examples-0.2.5-SNAPSHOT.jar com.google.cloud.nio.examples.ListFilesystems
2626
```
2727
28-
Notice that it lists gcs, which it wouldn't if you ran it without the nio jar:
28+
Notice that it lists Google Cloud Storage, which it wouldn't if you ran it without the NIO jar:
2929
```
3030
java -cp gcloud-java-contrib/gcloud-java-nio-examples/target/gcloud-java-nio-examples-0.2.5-SNAPSHOT.jar com.google.cloud.nio.examples.ListFilesystems
3131
```
3232
33-
The sample doesn't have anything about GCS in it. It gets that ability from the nio jar that
34-
we're adding to the classpath. You can use the nio "fat shaded" jar for this purpose as it also
35-
includes the dependencies for gcloud-java-nio.
33+
The sample doesn't have anything about Google Cloud Storage in it. It gets that ability from the NIO
34+
jar that we're adding to the classpath. You can use the NIO "fat shaded" jar for this purpose as it
35+
also includes the dependencies for gcloud-java-nio.
3636
The underlying mechanism is Java's standard [ServiceLoader](https://docs.oracle.com/javase/7/docs/api/java/util/ServiceLoader.html)
3737
facility, the [standard way](http://docs.oracle.com/javase/7/docs/technotes/guides/io/fsp/filesystemprovider.html) to plug in NIO providers like this one.
3838
3939
If you have access to a project's source code you can also simply add gcloud-java-nio as
40-
a dependency and let Maven pull in the required dependencies (this is what the nio unit tests do).
41-
This approach is preferable as the fat jar approach may waste memory on multiple copies of dependencies.
40+
a dependency and let Maven pull in the required dependencies (this is what the NIO unit tests do).
41+
This approach is preferable as the fat jar approach may waste memory on multiple copies of
42+
dependencies.
4243
43-
[developers-console]:https://console.developers.google.com/
44+
[developers-console]:https://console.developers.google.com/

gcloud-java-contrib/gcloud-java-nio-examples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<name>GCloud Java NIO examples</name>
77
<url>https://github.com/GoogleCloudPlatform/gcloud-java/tree/master/gcloud-java-contrib/gcloud-java-nio-examples</url>
88
<description>
9-
Demonstrates how to use the gcloud-java-nio jar to add GCS functionality to legacy code.
9+
Demonstrates how to use the gcloud-java-nio jar to add Google Cloud Storage functionality to legacy code.
1010
</description>
1111
<parent>
1212
<groupId>com.google.cloud</groupId>

gcloud-java-contrib/gcloud-java-nio/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ yet implemented:
141141
* Resuming upload or download
142142
* Generations
143143
* File attributes
144-
* (more)
144+
* (more - list is not exhaustive)
145145

146146
Some features are not on the roadmap: this library would be a poor choice to
147147
mirror a local filesystem onto the cloud because Google Cloud Storage has a

gcloud-java-contrib/gcloud-java-nio/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<name>GCloud Java NIO</name>
77
<url>https://github.com/GoogleCloudPlatform/gcloud-java/tree/master/gcloud-java-contrib/gcloud-java-nio</url>
88
<description>
9-
FileSystemProvider for Java NIO to access GCS transparently.
9+
FileSystemProvider for Java NIO to access Google Cloud Storage transparently.
1010
</description>
1111
<parent>
1212
<groupId>com.google.cloud</groupId>

gcloud-java-contrib/gcloud-java-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public abstract class CloudStorageConfiguration {
5555
public abstract boolean usePseudoDirectories();
5656

5757
/**
58-
* Returns block size (in bytes) used when talking to the GCS HTTP server.
58+
* Returns block size (in bytes) used when talking to the Google Cloud Storage HTTP server.
5959
*/
6060
public abstract int blockSize();
6161

gcloud-java-contrib/gcloud-java-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystem.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,10 @@ public static CloudStorageFileSystem forBucket(String bucket, CloudStorageConfig
9797
/**
9898
* Returns Google Cloud Storage {@link FileSystem} object for {@code bucket}.
9999
*
100-
* <p>GCS file system objects are basically free. You can create as many as you want, even if you
101-
* have multiple instances for the same bucket. There's no actual system resources associated
102-
* with this object. Therefore calling {@link #close()} on the returned value is optional.
100+
* <p>Google Cloud Storage file system objects are basically free. You can create as many as you
101+
* want, even if you have multiple instances for the same bucket. There's no actual system
102+
* resources associated with this object. Therefore calling {@link #close()} on the returned value
103+
* is optional.
103104
*
104105
* <p><b>Note:</b> It is also possible to instantiate this class via Java's
105106
* {@code FileSystems.getFileSystem(URI.create("gs://bucket"))}. We discourage you
@@ -151,7 +152,7 @@ public CloudStorageConfiguration config() {
151152
public CloudStoragePath getPath(String first, String... more) {
152153
checkArgument(
153154
!first.startsWith(URI_SCHEME + ":"),
154-
"GCS FileSystem.getPath() must not have schema and bucket name: %s",
155+
"Google Cloud Storage FileSystem.getPath() must not have schema and bucket name: %s",
155156
first);
156157
return CloudStoragePath.getPath(this, first, more);
157158
}
@@ -196,7 +197,8 @@ public Iterable<Path> getRootDirectories() {
196197
}
197198

198199
/**
199-
* Returns nothing because GCS doesn't have disk partitions of limited size, or anything similar.
200+
* Returns nothing because Google Cloud Storage doesn't have disk partitions of limited size, or
201+
* anything similar.
200202
*/
201203
@Override
202204
public Iterable<FileStore> getFileStores() {

gcloud-java-contrib/gcloud-java-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemProvider.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@
7777
*
7878
* <p><b>Note:</b> This class should never be used directly. This class is instantiated by the
7979
* service loader and called through a standardized API, e.g. {@link java.nio.file.Files}. However
80-
* the javadocs in this class serve as useful documentation for the behavior of the GCS NIO library.
80+
* the javadocs in this class serve as useful documentation for the behavior of the Google Cloud
81+
* Storage NIO library.
8182
*/
8283
@Singleton
8384
@ThreadSafe
@@ -481,7 +482,7 @@ public boolean isSameFile(Path path, Path path2) {
481482
}
482483

483484
/**
484-
* Always returns {@code false}, because GCS doesn't support hidden files.
485+
* Always returns {@code false}, because Google Cloud Storage doesn't support hidden files.
485486
*/
486487
@Override
487488
public boolean isHidden(Path path) {
@@ -561,7 +562,7 @@ public <V extends FileAttributeView> V getFileAttributeView(
561562
}
562563

563564
/**
564-
* Does nothing since GCS uses fake directories.
565+
* Does nothing since Google Cloud Storage uses fake directories.
565566
*/
566567
@Override
567568
public void createDirectory(Path dir, FileAttribute<?>... attrs) {

gcloud-java-contrib/gcloud-java-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageOption.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@
2525
public interface CloudStorageOption {
2626

2727
/**
28-
* Interface for GCS options that can be specified when opening files.
28+
* Interface for Google Cloud Storage options that can be specified when opening files.
2929
*/
3030
interface Open extends CloudStorageOption, OpenOption {}
3131

3232
/**
33-
* Interface for GCS options that can be specified when copying files.
33+
* Interface for Google Cloud Storage options that can be specified when copying files.
3434
*/
3535
interface Copy extends CloudStorageOption, CopyOption {}
3636

3737
/**
38-
* Interface for GCS options that can be specified when opening or copying files.
38+
* Interface for Google Cloud Storage options that can be specified when opening or copying files.
3939
*/
4040
interface OpenCopy extends Open, Copy {}
4141
}

gcloud-java-contrib/gcloud-java-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public static CloudStorageOption.OpenCopy withUserMetadata(String key, String va
8383
}
8484

8585
/**
86-
* Sets the block size (in bytes) when talking to the GCS server.
86+
* Sets the block size (in bytes) when talking to the Google Cloud Storage server.
8787
*
8888
* <p>The default is {@value CloudStorageFileSystem#BLOCK_SIZE_DEFAULT}.
8989
*/

0 commit comments

Comments
 (0)