Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.flexstor.common.io.xfile.unc
Class UncFile  view UncFile download UncFile.java

java.lang.Object
  extended bycom.flexstor.common.io.xfile.unc.UncFile
All Implemented Interfaces:
com.flexstor.common.io.xfile.FlexXFileI

public class UncFile
extends java.lang.Object
implements com.flexstor.common.io.xfile.FlexXFileI


Field Summary
private  boolean bIsUNC
           
private  java.io.File javaFile
           
private  java.lang.String server
           
private  java.lang.String sLocalPath
           
private  java.lang.String sSeparator
           
 
Constructor Summary
UncFile(com.flexstor.common.io.xfile.FlexXFile file, java.lang.String str)
           
UncFile(java.lang.String str)
           
 
Method Summary
private  java.lang.String adjustSeparator(java.lang.String sIn)
          When methods which return a path are called this method makes sure that the file separator returned in the path is the same as the original path used to create the object.
 boolean canRead()
           
 boolean canWrite()
           
 boolean delete()
           
 boolean exists()
           
 java.lang.String[] extendedList()
           
 java.lang.String[] extendedList(com.flexstor.common.io.xfile.XFilenameFilterI filter)
           
 java.lang.String getAbsolutePath()
           
 java.io.BufferedInputStream getBufferedInputStream()
           
 java.io.BufferedInputStream getBufferedInputStream(int bufferSize)
           
 java.io.BufferedOutputStream getBufferedOutputStream()
           
 java.io.BufferedOutputStream getBufferedOutputStream(int bufferSize)
           
 java.io.BufferedReader getBufferedReader()
           
 java.io.BufferedReader getBufferedReader(int bufferSize)
           
 java.io.BufferedWriter getBufferedWriter()
           
 java.io.BufferedWriter getBufferedWriter(int bufferSize)
           
 java.lang.String getFileSeparator()
           
 java.lang.String getFileSystemName()
           
 java.lang.String getLocalParent()
           
 java.lang.String getLocalPath()
           
 java.lang.String getLocalUNCPath()
           
 java.lang.String getName()
           
 java.lang.String getParent()
           
 java.lang.String getPath()
           
 java.lang.String getServer()
           
 java.lang.String getUNCPath()
           
 boolean isAbsolute()
           
 boolean isDirectory()
           
 boolean isFile()
           
 boolean isLocalPath()
           
 long lastModified()
           
 long length()
           
 java.lang.String[] list()
           
 java.lang.String[] list(com.flexstor.common.io.xfile.XFilenameFilterI filter)
           
 boolean mkdir()
           
 boolean mkdirs()
           
 boolean renameTo(com.flexstor.common.io.xfile.FlexXFileI xFile)
           
private  void setFlags(java.lang.String loc)
          Sets the UNC and separator flags
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sSeparator

private java.lang.String sSeparator

bIsUNC

private boolean bIsUNC

server

private java.lang.String server

sLocalPath

private java.lang.String sLocalPath

javaFile

private java.io.File javaFile
Constructor Detail

UncFile

public UncFile(com.flexstor.common.io.xfile.FlexXFile file,
               java.lang.String str)

UncFile

public UncFile(java.lang.String str)
Method Detail

setFlags

private void setFlags(java.lang.String loc)
Sets the UNC and separator flags


extendedList

public java.lang.String[] extendedList()
Specified by:
extendedList in interface com.flexstor.common.io.xfile.FlexXFileI

extendedList

public java.lang.String[] extendedList(com.flexstor.common.io.xfile.XFilenameFilterI filter)
Specified by:
extendedList in interface com.flexstor.common.io.xfile.FlexXFileI

getBufferedInputStream

public java.io.BufferedInputStream getBufferedInputStream()
                                                   throws java.io.IOException
Specified by:
getBufferedInputStream in interface com.flexstor.common.io.xfile.FlexXFileI

getBufferedInputStream

public java.io.BufferedInputStream getBufferedInputStream(int bufferSize)
                                                   throws java.io.IOException
Specified by:
getBufferedInputStream in interface com.flexstor.common.io.xfile.FlexXFileI

getBufferedOutputStream

public java.io.BufferedOutputStream getBufferedOutputStream()
                                                     throws java.io.IOException
Specified by:
getBufferedOutputStream in interface com.flexstor.common.io.xfile.FlexXFileI

getBufferedOutputStream

public java.io.BufferedOutputStream getBufferedOutputStream(int bufferSize)
                                                     throws java.io.IOException
Specified by:
getBufferedOutputStream in interface com.flexstor.common.io.xfile.FlexXFileI

getBufferedReader

public java.io.BufferedReader getBufferedReader()
                                         throws java.io.IOException
Specified by:
getBufferedReader in interface com.flexstor.common.io.xfile.FlexXFileI

getBufferedReader

public java.io.BufferedReader getBufferedReader(int bufferSize)
                                         throws java.io.IOException
Specified by:
getBufferedReader in interface com.flexstor.common.io.xfile.FlexXFileI

getBufferedWriter

public java.io.BufferedWriter getBufferedWriter()
                                         throws java.io.IOException
Specified by:
getBufferedWriter in interface com.flexstor.common.io.xfile.FlexXFileI

getBufferedWriter

public java.io.BufferedWriter getBufferedWriter(int bufferSize)
                                         throws java.io.IOException
Specified by:
getBufferedWriter in interface com.flexstor.common.io.xfile.FlexXFileI

getFileSystemName

public java.lang.String getFileSystemName()
Specified by:
getFileSystemName in interface com.flexstor.common.io.xfile.FlexXFileI

getAbsolutePath

public java.lang.String getAbsolutePath()
Specified by:
getAbsolutePath in interface com.flexstor.common.io.xfile.FlexXFileI

getParent

public java.lang.String getParent()
Specified by:
getParent in interface com.flexstor.common.io.xfile.FlexXFileI

getPath

public java.lang.String getPath()
Specified by:
getPath in interface com.flexstor.common.io.xfile.FlexXFileI

getLocalParent

public java.lang.String getLocalParent()
Specified by:
getLocalParent in interface com.flexstor.common.io.xfile.FlexXFileI

getLocalPath

public java.lang.String getLocalPath()
Specified by:
getLocalPath in interface com.flexstor.common.io.xfile.FlexXFileI

getUNCPath

public java.lang.String getUNCPath()
Specified by:
getUNCPath in interface com.flexstor.common.io.xfile.FlexXFileI

getLocalUNCPath

public java.lang.String getLocalUNCPath()
Specified by:
getLocalUNCPath in interface com.flexstor.common.io.xfile.FlexXFileI

getServer

public java.lang.String getServer()
Specified by:
getServer in interface com.flexstor.common.io.xfile.FlexXFileI

isLocalPath

public boolean isLocalPath()
Specified by:
isLocalPath in interface com.flexstor.common.io.xfile.FlexXFileI

list

public java.lang.String[] list(com.flexstor.common.io.xfile.XFilenameFilterI filter)
Specified by:
list in interface com.flexstor.common.io.xfile.FlexXFileI

renameTo

public boolean renameTo(com.flexstor.common.io.xfile.FlexXFileI xFile)
Specified by:
renameTo in interface com.flexstor.common.io.xfile.FlexXFileI

canRead

public boolean canRead()
Specified by:
canRead in interface com.flexstor.common.io.xfile.FlexXFileI

canWrite

public boolean canWrite()
Specified by:
canWrite in interface com.flexstor.common.io.xfile.FlexXFileI

delete

public boolean delete()
Specified by:
delete in interface com.flexstor.common.io.xfile.FlexXFileI

exists

public boolean exists()
Specified by:
exists in interface com.flexstor.common.io.xfile.FlexXFileI

getName

public java.lang.String getName()
Specified by:
getName in interface com.flexstor.common.io.xfile.FlexXFileI

isAbsolute

public boolean isAbsolute()
Specified by:
isAbsolute in interface com.flexstor.common.io.xfile.FlexXFileI

isDirectory

public boolean isDirectory()
Specified by:
isDirectory in interface com.flexstor.common.io.xfile.FlexXFileI

isFile

public boolean isFile()
Specified by:
isFile in interface com.flexstor.common.io.xfile.FlexXFileI

length

public long length()
Specified by:
length in interface com.flexstor.common.io.xfile.FlexXFileI

list

public java.lang.String[] list()
Specified by:
list in interface com.flexstor.common.io.xfile.FlexXFileI

mkdir

public boolean mkdir()
Specified by:
mkdir in interface com.flexstor.common.io.xfile.FlexXFileI

mkdirs

public boolean mkdirs()
Specified by:
mkdirs in interface com.flexstor.common.io.xfile.FlexXFileI

lastModified

public long lastModified()
Specified by:
lastModified in interface com.flexstor.common.io.xfile.FlexXFileI

adjustSeparator

private java.lang.String adjustSeparator(java.lang.String sIn)
When methods which return a path are called this method makes sure that the file separator returned in the path is the same as the original path used to create the object. Without this logic the paths returned will have the OS's file separator which may not always match what was used to create the object IE: under windows forward slashes may be used to create a file object but backslashes will be returned in paths


getFileSeparator

public java.lang.String getFileSeparator()
Specified by:
getFileSeparator in interface com.flexstor.common.io.xfile.FlexXFileI

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).