co.cask.tigon.io
Interface Encoder

All Known Implementing Classes:
BinaryEncoder, BufferedEncoder

public interface Encoder

Interface for encoding data.


Method Summary
 Encoder writeBool(boolean b)
           
 Encoder writeBytes(byte[] bytes)
           
 Encoder writeBytes(byte[] bytes, int off, int len)
           
 Encoder writeBytes(ByteBuffer bytes)
          Writes out the remaining bytes in ByteBuffer.
 Encoder writeDouble(double d)
           
 Encoder writeFloat(float f)
           
 Encoder writeInt(int i)
           
 Encoder writeLong(long l)
           
 Encoder writeNull()
           
 Encoder writeString(String s)
           
 

Method Detail

writeNull

Encoder writeNull()
                  throws IOException
Throws:
IOException

writeBool

Encoder writeBool(boolean b)
                  throws IOException
Throws:
IOException

writeInt

Encoder writeInt(int i)
                 throws IOException
Throws:
IOException

writeLong

Encoder writeLong(long l)
                  throws IOException
Throws:
IOException

writeFloat

Encoder writeFloat(float f)
                   throws IOException
Throws:
IOException

writeDouble

Encoder writeDouble(double d)
                    throws IOException
Throws:
IOException

writeString

Encoder writeString(String s)
                    throws IOException
Throws:
IOException

writeBytes

Encoder writeBytes(byte[] bytes)
                   throws IOException
Throws:
IOException

writeBytes

Encoder writeBytes(byte[] bytes,
                   int off,
                   int len)
                   throws IOException
Throws:
IOException

writeBytes

Encoder writeBytes(ByteBuffer bytes)
                   throws IOException
Writes out the remaining bytes in ByteBuffer.

The given ByteBuffer is untouched after this method returns (i.e. same position and limit).

Parameters:
bytes -
Throws:
IOException


Copyright © 2014 Cask Data, Inc. Licensed under the Apache License, Version 2.0.