Package de.lema.appender.net
Class AbstractObjectWriter
- java.lang.Object
-
- de.lema.appender.net.AbstractObjectWriter
-
- Direct Known Subclasses:
ObjectReader,ObjectWriter
public abstract class AbstractObjectWriter extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAbstractObjectWriter.HeaderElement
-
Field Summary
Fields Modifier and Type Field Description protected static intELEMENT_LENGTHprotected static intPREFIX_SIZE
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractObjectWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intberechneErsteSchreibposition(int maxElementeImHeader)voidclose()protected voidcreateHeaderbuffer(int maxElementeImHeader)protected intinitHeaderBufferWennNotwendig()protected booleanisFileOpen()protected voidopenFile(File file)protected ObjectreadAndUpdateHeader(int maxElementeImHeader)protected voidwriteAndUpdateHeader(AbstractObjectWriter.HeaderElement headerElementAkt, byte[] serializeObject, int maxElementeImHeader)protected voidwriteEmptyHeader(int maxElementeImHeader)protected voidwriteHeaderElement(AbstractObjectWriter.HeaderElement heNeu, boolean mitLock)protected voidwriteObject(byte[] serializeObject, long startPos)
-
-
-
Field Detail
-
PREFIX_SIZE
protected static final int PREFIX_SIZE
- See Also:
- Constant Field Values
-
ELEMENT_LENGTH
protected static final int ELEMENT_LENGTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
close
public void close() throws IOException- Throws:
IOException
-
createHeaderbuffer
protected void createHeaderbuffer(int maxElementeImHeader)
-
readAndUpdateHeader
protected Object readAndUpdateHeader(int maxElementeImHeader) throws IOException, ClassNotFoundException
- Throws:
IOExceptionClassNotFoundException
-
writeAndUpdateHeader
protected void writeAndUpdateHeader(AbstractObjectWriter.HeaderElement headerElementAkt, byte[] serializeObject, int maxElementeImHeader) throws IOException
- Throws:
IOException
-
initHeaderBufferWennNotwendig
protected int initHeaderBufferWennNotwendig() throws IOException- Throws:
IOException
-
isFileOpen
protected boolean isFileOpen()
-
openFile
protected void openFile(File file) throws FileNotFoundException
- Throws:
FileNotFoundException
-
berechneErsteSchreibposition
protected int berechneErsteSchreibposition(int maxElementeImHeader)
-
writeEmptyHeader
protected void writeEmptyHeader(int maxElementeImHeader) throws IOException- Throws:
IOException
-
writeHeaderElement
protected void writeHeaderElement(AbstractObjectWriter.HeaderElement heNeu, boolean mitLock) throws IOException
- Throws:
IOException
-
writeObject
protected void writeObject(byte[] serializeObject, long startPos) throws IOException- Throws:
IOException
-
-