|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ImgFileWriter
I want to be able to experiment with different schemes to write out. I am hoping that you do not need to write files with contiguous blocks, however since all maps seem to do that it may not be possible. Having a block list is then a bit strange. Perhaps you can but it performs worse so no one does it?
Method Summary | |
---|---|
long |
getSize()
Returns the size of the file. |
int |
position()
Get the position. |
void |
position(long pos)
Set the position of the file. |
void |
put(byte b)
Write out a single byte. |
void |
put(byte[] val)
Write out an arbitrary length sequence of bytes. |
void |
put(byte[] src,
int start,
int length)
Write out part of a byte array. |
void |
put3(int val)
Write out three bytes. |
void |
putChar(char c)
Write out two bytes. |
void |
putInt(int val)
Write out 4 byte value. |
void |
sync()
Called to write out any saved buffers. |
Methods inherited from interface java.io.Closeable |
---|
close |
Method Detail |
---|
void sync() throws java.io.IOException
java.io.IOException
- If there is an error writing.int position()
void position(long pos)
pos
- The new position in the file.void put(byte b)
b
- The byte to write.void putChar(char c)
c
- The value to write.void put3(int val)
val
- The value to write, only the bottom three bytes will be
written.void putInt(int val)
val
- The value to write.void put(byte[] val)
val
- The values to write.void put(byte[] src, int start, int length)
src
- The array to take bytes from.start
- The start position.length
- The number of bytes to write.long getSize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |