[WIP] [TACHYON-152] Client write refactor

Rewriting how client writes out blocks to make it easier to add remote blocks.

The current design is as follows:

Users requests access to a block

```java
Block block = Blocks.createBlock(tachyonFS, blockId, blockCapacityByte);
```

From there, the user can write to it by accessing its `Channel`.

```java
WritableBlockChannel channel = block.write();
channel.write(byteBuffer);
channel.close();
```

When the block is full, write returns -1, so you do this in a loop and create new blocks.

```java
while (buffer.remaining() > 0) {
  int n = mCurrentBlockChannel.write(buffer);
  if (n <= 0) {
    // block full, get new block
    getNextBlock();
  }
}
```
I could do that.  Not really a fan of get in the name of method though.
On Sep 11, 2014 9:04 PM, "Jie Huang" <notifications@github.com> wrote:

> In core/src/main/java/tachyon/client/Block.java:
>
> > @@ -0,0 +1,7 @@
> > +package tachyon.client;
> > +
> > +import java.io.IOException;
> > +
> > +interface Block {
> > +  WritableBlockChannel write() throws IOException;
>
> It looks better. Or sth. like getWriteChannel()
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/amplab/tachyon/pull/427/files#r17462283>.
>