Top Description Fields Constructors Methods
org.jruby.util

pack-priv final Class NullDeviceResource

extends Object
implements FileResource
Class Inheritance
All Implemented Interfaces
org.jruby.util.FileResource
Imports
jnr.constants.platform.Errno, jnr.posix.FileStat, org.jruby.util.io.ModeFlags, java.io.*, java.nio.channels.Channel, .FileChannel, java.nio.file.attribute.FileTime

Represents a the NUL: device on Windows, which is not a normal file.

Field Summary

Modifier and TypeField and Description
private static final JRubyFile
private static final String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public String
public boolean
public String
public boolean
public boolean
private Channel
public FileTime
public int
public boolean
public boolean
public boolean
public boolean
public FileTime
public long
public FileTime
public long
public String[]
public FileStat
public Channel
openChannel(int flags, int perm)

Implements org.jruby.util.FileResource.openChannel.

public InputStream
openInputStream()

Implements org.jruby.util.FileResource.openInputStream.

Opens a new input stream to read the contents of a resource and returns it.

public String
public FileStat
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public <T> T
unwrap(Class<T> type)

Implements org.jruby.util.FileResource.unwrap.

Unwrap the resource backend (replacement for hackyGetJRubyFile()).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

fileback to summary
private static final JRubyFile file
NUL_DEVICEback to summary
private static final String NUL_DEVICE

Constructor Detail

NullDeviceResourceback to summary
pack-priv NullDeviceResource()

Method Detail

absolutePathback to summary
public String absolutePath()

Implements org.jruby.util.FileResource.absolutePath.

Annotations
@Override
canExecuteback to summary
public boolean canExecute()

Implements org.jruby.util.FileResource.canExecute.

Annotations
@Override
canonicalPathback to summary
public String canonicalPath()

Implements org.jruby.util.FileResource.canonicalPath.

Annotations
@Override
canReadback to summary
public boolean canRead()

Implements org.jruby.util.FileResource.canRead.

Annotations
@Override
canWriteback to summary
public boolean canWrite()

Implements org.jruby.util.FileResource.canWrite.

Annotations
@Override
createChannelback to summary
private Channel createChannel(ModeFlags flags) throws IOException
creationTimeback to summary
public FileTime creationTime()
errnoback to summary
public int errno()

Implements org.jruby.util.FileResource.errno.

existsback to summary
public boolean exists()

Implements org.jruby.util.FileResource.exists.

Annotations
@Override
isDirectoryback to summary
public boolean isDirectory()

Implements org.jruby.util.FileResource.isDirectory.

Annotations
@Override
isFileback to summary
public boolean isFile()

Implements org.jruby.util.FileResource.isFile.

Annotations
@Override
isNullback to summary
public boolean isNull()

Overrides default org.jruby.util.FileResource.isNull.

Returns:boolean

Doc from org.jruby.util.FileResource.isNull.

is this a NUL device?

Annotations
@Override
lastAccessTimeback to summary
public FileTime lastAccessTime()
lastModifiedback to summary
public long lastModified()

Implements org.jruby.util.FileResource.lastModified.

Annotations
@Override
lastModifiedTimeback to summary
public FileTime lastModifiedTime()
lengthback to summary
public long length()

Implements org.jruby.util.FileResource.length.

Annotations
@Override
listback to summary
public String[] list()

Implements org.jruby.util.FileResource.list.

Annotations
@Override
lstatback to summary
public FileStat lstat()

Implements org.jruby.util.FileResource.lstat.

Annotations
@Override
openChannelback to summary
public Channel openChannel(int flags, int perm) throws IOException

Implements org.jruby.util.FileResource.openChannel.

Annotations
@Override
openInputStreamback to summary
public InputStream openInputStream() throws IOException

Implements org.jruby.util.FileResource.openInputStream.

Doc from org.jruby.util.FileResource.openInputStream.

Opens a new input stream to read the contents of a resource and returns it. Note that implementations may be allocating native memory for the stream, so callers need to close this when they are done with it. users of this method should follow the pattern: close the stream where you open it.

Returns:InputStream

InputStream

Annotations
@Override
pathback to summary
public String path()

Implements org.jruby.util.FileResource.path.

Annotations
@Override
statback to summary
public FileStat stat()

Implements org.jruby.util.FileResource.stat.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
unwrapback to summary
public <T> T unwrap(Class<T> type)

Implements org.jruby.util.FileResource.unwrap.

Doc from org.jruby.util.FileResource.unwrap.

Unwrap the resource backend (replacement for hackyGetJRubyFile()).

Returns:T

backend if supported

Annotations
@Override