org.exoplatform.services.jcr.ext.replication.recovery
Class AbstractFSAccess

java.lang.Object
  extended by org.exoplatform.services.jcr.ext.replication.recovery.AbstractFSAccess
Direct Known Subclasses:
RecoveryReader, RecoveryWriter

public class AbstractFSAccess
extends java.lang.Object

Created by The eXo Platform SAS.

Version:
$Id: AbstractFSAccess.java 35186 2009-08-07 14:23:43Z pnedonosko $
Author:
Alex Reshetnyak

Field Summary
protected static int BUFFER_1KB
          Definition the constant for 1k buffer.
protected static int BUFFER_20X
          Definition the constant for 20k buffer.
protected static int BUFFER_8X
          Definition the constant for 8k buffer.
static java.lang.String DATA_DIR_NAME
          Definition the name for data folder.
static java.lang.String PREFIX_CHAR
          Definition the prefix char.
static java.lang.String PREFIX_REMOVED_DATA
          Definition the prefix string for removed data.
static java.lang.String REMOVED_SUFFIX
          Definition the suffix string for removed files.
 
Constructor Summary
AbstractFSAccess()
           
 
Method Summary
protected  java.io.File getAsFile(java.io.InputStream is)
          getAsFile.
protected  java.io.File getAsFile(java.io.ObjectInputStream ois, long fileSize)
          getAsFile.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATA_DIR_NAME

public static final java.lang.String DATA_DIR_NAME
Definition the name for data folder.

See Also:
Constant Field Values

PREFIX_REMOVED_DATA

public static final java.lang.String PREFIX_REMOVED_DATA
Definition the prefix string for removed data.

See Also:
Constant Field Values

PREFIX_CHAR

public static final java.lang.String PREFIX_CHAR
Definition the prefix char.

See Also:
Constant Field Values

REMOVED_SUFFIX

public static final java.lang.String REMOVED_SUFFIX
Definition the suffix string for removed files.

See Also:
Constant Field Values

BUFFER_1KB

protected static final int BUFFER_1KB
Definition the constant for 1k buffer.

See Also:
Constant Field Values

BUFFER_8X

protected static final int BUFFER_8X
Definition the constant for 8k buffer.

See Also:
Constant Field Values

BUFFER_20X

protected static final int BUFFER_20X
Definition the constant for 20k buffer.

See Also:
Constant Field Values
Constructor Detail

AbstractFSAccess

public AbstractFSAccess()
Method Detail

getAsFile

protected java.io.File getAsFile(java.io.InputStream is)
                          throws java.io.IOException
getAsFile. The input stream will be spooled to file.

Parameters:
is - the InputStream
Returns:
File return the spooled file
Throws:
java.io.IOException - will be generated the IOExceprion

getAsFile

protected java.io.File getAsFile(java.io.ObjectInputStream ois,
                                 long fileSize)
                          throws java.io.IOException
getAsFile.

Parameters:
ois - the ObjectInputStream
fileSize - will be read 'fileSize' bytes from stream
Returns:
File return the file with data
Throws:
java.io.IOException - will be generated the IOException


Copyright © 2012 eXo Platform SAS. All Rights Reserved.