com.application.areca.metadata
Class AbstractMetadataAdapter

java.lang.Object
  extended by com.application.areca.metadata.AbstractMetadataAdapter
Direct Known Subclasses:
ArchiveContentAdapter, ArchiveTraceAdapter

public abstract class AbstractMetadataAdapter
extends java.lang.Object

Abstract implementation for metada adapters

Author:
Olivier PETRUCCI

Areca Build ID : 7299034069467778562

Field Summary
protected static java.lang.String DATA_CHARSET
           
protected  java.io.File file
          File
protected  boolean isCompressed
          Tells wether the content is compressed or not
protected  java.io.OutputStream outputStream
          OS
protected static java.lang.String VERSION
           
protected static java.lang.String VERSION_HEADER
           
protected  java.io.Writer writer
          Writer
protected  long written
          Counts the element that have been written
 
Constructor Summary
AbstractMetadataAdapter()
           
 
Method Summary
 void close()
           
abstract  AbstractMetaDataEntry decodeEntry(java.lang.String line)
           
 java.io.File getFile()
           
protected  java.io.InputStream getInputStream()
           
protected  long getVersion()
           
protected  java.lang.String getVersionHeader()
           
 long getWritten()
           
protected  void initOutputStream()
           
protected  void initWriter()
           
 boolean isCompressed()
           
protected  java.lang.String resolveEncoding(long version)
           
 void setCompressed(boolean isCompressed)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATA_CHARSET

protected static final java.lang.String DATA_CHARSET
See Also:
Constant Field Values

VERSION_HEADER

protected static final java.lang.String VERSION_HEADER
See Also:
Constant Field Values

VERSION

protected static final java.lang.String VERSION
See Also:
Constant Field Values

writer

protected java.io.Writer writer
Writer


written

protected long written
Counts the element that have been written


outputStream

protected java.io.OutputStream outputStream
OS


isCompressed

protected boolean isCompressed
Tells wether the content is compressed or not


file

protected java.io.File file
File

Constructor Detail

AbstractMetadataAdapter

public AbstractMetadataAdapter()
Method Detail

initOutputStream

protected void initOutputStream()
                         throws java.io.IOException
Throws:
java.io.IOException

getFile

public java.io.File getFile()

initWriter

protected void initWriter()
                   throws java.io.IOException
Throws:
java.io.IOException

getVersionHeader

protected java.lang.String getVersionHeader()

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

getInputStream

protected java.io.InputStream getInputStream()
                                      throws java.io.IOException
Throws:
java.io.IOException

getVersion

protected long getVersion()
                   throws java.io.IOException
Throws:
java.io.IOException

decodeEntry

public abstract AbstractMetaDataEntry decodeEntry(java.lang.String line)

resolveEncoding

protected java.lang.String resolveEncoding(long version)
                                    throws java.io.IOException
Throws:
java.io.IOException

isCompressed

public boolean isCompressed()

setCompressed

public void setCompressed(boolean isCompressed)

getWritten

public long getWritten()