|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cassandra.io.SequenceFile.AbstractWriter
org.apache.cassandra.io.SequenceFile.Writer
public static class SequenceFile.Writer
Field Summary | |
---|---|
protected java.io.RandomAccessFile |
file_
|
Fields inherited from class org.apache.cassandra.io.SequenceFile.AbstractWriter |
---|
filename_ |
Method Summary | |
---|---|
void |
append(DataOutputBuffer buffer)
Appends the buffer to the the underlying SequenceFile. |
void |
append(DataOutputBuffer keyBuffer,
DataOutputBuffer buffer)
Appends the key and the value to the the underlying SequenceFile. |
void |
append(java.lang.String key,
byte[] value)
Appends the key and the value to the the underlying SequenceFile. |
void |
append(java.lang.String key,
DataOutputBuffer buffer)
Appends the key and the value to the the underlying SequenceFile. |
void |
append(java.lang.String key,
long value)
Appends the key and the long value to the the underlying SequenceFile. |
void |
close()
Close the file which is being used for the write. |
void |
close(byte[] footer,
int size)
Close the file after appending the passed in footer information. |
long |
getCurrentPosition()
Get the current position of the file pointer. |
java.lang.String |
getFileName()
|
long |
getFileSize()
|
protected void |
init(java.lang.String filename)
|
protected void |
init(java.lang.String filename,
int size)
|
void |
seek(long position)
Seeks the file pointer to the specified position. |
long |
writeDirect(byte[] bytes)
Be extremely careful while using this API. |
void |
writeLong(long value)
Write a long into the underlying sub system. |
Methods inherited from class org.apache.cassandra.io.SequenceFile.AbstractWriter |
---|
lastModified |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.io.RandomAccessFile file_
Method Detail |
---|
protected void init(java.lang.String filename) throws java.io.IOException
java.io.IOException
protected void init(java.lang.String filename, int size) throws java.io.IOException
java.io.IOException
public long getCurrentPosition() throws java.io.IOException
IFileWriter
java.io.IOException
public void seek(long position) throws java.io.IOException
IFileWriter
position
- position within the file to seek to.
java.io.IOException
public void append(DataOutputBuffer buffer) throws java.io.IOException
IFileWriter
buffer
- buffer which contains the serialized data.
java.io.IOException
public void append(DataOutputBuffer keyBuffer, DataOutputBuffer buffer) throws java.io.IOException
IFileWriter
keyBuffer
- buffer which contains the serialized key.buffer
- buffer which contains the serialized data.
java.io.IOException
public void append(java.lang.String key, DataOutputBuffer buffer) throws java.io.IOException
IFileWriter
key
- key associated with this peice of data.buffer
- buffer containing the serialized data.
java.io.IOException
public void append(java.lang.String key, byte[] value) throws java.io.IOException
IFileWriter
key
- key associated with this peice of data.value
- byte array containing the serialized data.
java.io.IOException
public void append(java.lang.String key, long value) throws java.io.IOException
IFileWriter
key
- key associated with this peice of data.value
- value associated with this key.
java.io.IOException
public long writeDirect(byte[] bytes) throws java.io.IOException
bytes
- the bytes to write
java.io.IOException
public void writeLong(long value) throws java.io.IOException
IFileWriter
value
- long to be written
java.io.IOException
public void close() throws java.io.IOException
IFileWriter
java.io.IOException
public void close(byte[] footer, int size) throws java.io.IOException
IFileWriter
footer
- footer information.size
- size of the footer.
java.io.IOException
public java.lang.String getFileName()
getFileName
in interface IFileWriter
getFileName
in class SequenceFile.AbstractWriter
public long getFileSize() throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |