Package com.google.cloud.examples.nio
Class CountBytes
- java.lang.Object
-
- com.google.cloud.examples.nio.CountBytes
-
public class CountBytes extends Object
CountBytes will read through the whole file given as input.This example shows how to read a file size using NIO. File.size returns the size of the file as saved in Storage metadata. This class also shows how to read all of the file's contents using NIO, computes a MD5 hash, and reports how long it took.
See the README for compilation instructions. Run this code with
target/appassembler/bin/CountBytes <file>
-
-
Constructor Summary
Constructors Constructor Description CountBytes()
-
-
-
Method Detail
-
main
public static void main(String[] args) throws IOException
See the class documentation.- Throws:
IOException
-
-