Class RandomAccessFileStoreWriter
- java.lang.Object
-
- jetbrains.buildServer.vcs.patches.store.RandomAccessFileStoreWriter
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,FileStorageWriter
public class RandomAccessFileStoreWriter extends Object implements FileStorageWriter, Closeable
- Author:
- Eugene Petrenko Created: 30.04.2009 20:06:19
-
-
Constructor Summary
Constructors Constructor Description RandomAccessFileStoreWriter(File file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
FileStorageReader
closeOpenReader()
Closes current writer and opens a reader to read contentsvoid
closeWriter()
Closes write processFileKey
writeFile(File file)
Copies file and returns file id
-
-
-
Constructor Detail
-
RandomAccessFileStoreWriter
public RandomAccessFileStoreWriter(@NotNull File file) throws IOException
- Throws:
IOException
-
-
Method Detail
-
writeFile
@NotNull public FileKey writeFile(@NotNull File file) throws IOException
Description copied from interface:FileStorageWriter
Copies file and returns file id- Specified by:
writeFile
in interfaceFileStorageWriter
- Parameters:
file
- a file to copy- Returns:
- unique id of stored file
- Throws:
IOException
- on error
-
closeOpenReader
@NotNull public FileStorageReader closeOpenReader() throws IOException
Description copied from interface:FileStorageWriter
Closes current writer and opens a reader to read contents- Specified by:
closeOpenReader
in interfaceFileStorageWriter
- Returns:
- reader
- Throws:
IOException
- error
-
closeWriter
public void closeWriter() throws IOException
Description copied from interface:FileStorageWriter
Closes write process- Specified by:
closeWriter
in interfaceFileStorageWriter
- Throws:
IOException
- on error
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
-