public final class RawDirectoryWrapper extends BaseDirectoryWrapper
This class is used if you want the most realistic testing, but still with a checkindex on close. If you want asserts and evil things, use MockDirectoryWrapper instead.
isOpen
in
Constructor and Description |
---|
RawDirectoryWrapper(Directory delegate) |
Modifier and Type | Method and Description |
---|---|
void |
copyFrom(Directory from,
java.lang.String src,
java.lang.String dest,
IOContext context)
Copies an existing
src file from directory from
to a non-existent file dest in this directory. |
protected void |
ensureOpen()
Ensures this directory is still open.
|
ChecksumIndexInput |
openChecksumInput(java.lang.String name,
IOContext context)
Opens a checksum-computing stream for reading an existing file.
|
close, getCheckIndexOnClose, getCrossCheckTermVectorsOnClose, isOpen, setCheckIndexOnClose, setCrossCheckTermVectorsOnClose
createOutput, createTempOutput, deleteFile, fileLength, getDelegate, getPendingDeletions, listAll, obtainLock, openInput, rename, sync, syncMetaData, toString, unwrap
public RawDirectoryWrapper(Directory delegate)
public void copyFrom(Directory from, java.lang.String src, java.lang.String dest, IOContext context) throws java.io.IOException
Directory
src
file from directory from
to a non-existent file dest
in this directory.public ChecksumIndexInput openChecksumInput(java.lang.String name, IOContext context) throws java.io.IOException
Directory
NoSuchFileException
or FileNotFoundException
if name
points to a non-existing file.openChecksumInput
in class Directory
name
- the name of an existing file.java.io.IOException
- in case of I/O errorprotected void ensureOpen() throws AlreadyClosedException
Directory
ensureOpen
in class Directory
AlreadyClosedException
- if this directory is closed.Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.