org.apache.maven.shared.io.location
Class FileLocation

java.lang.Object
  extended by org.apache.maven.shared.io.location.FileLocation
All Implemented Interfaces:
Location
Direct Known Subclasses:
ArtifactLocation, URLLocation

public class FileLocation
extends Object
implements Location


Constructor Summary
  FileLocation(File file, String specification)
           
protected FileLocation(String specification)
           
 
Method Summary
 void close()
           
 File getFile()
           
 InputStream getInputStream()
           
 String getSpecification()
           
protected  void initFile()
           
 void open()
           
 int read(byte[] buffer)
           
 int read(ByteBuffer buffer)
           
protected  void setFile(File file)
           
protected  File unsafeGetFile()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileLocation

public FileLocation(File file,
                    String specification)

FileLocation

protected FileLocation(String specification)
Method Detail

close

public void close()
Specified by:
close in interface Location

getFile

public File getFile()
             throws IOException
Specified by:
getFile in interface Location
Throws:
IOException

unsafeGetFile

protected File unsafeGetFile()

initFile

protected void initFile()
                 throws IOException
Throws:
IOException

setFile

protected void setFile(File file)

getSpecification

public String getSpecification()
Specified by:
getSpecification in interface Location

open

public void open()
          throws IOException
Specified by:
open in interface Location
Throws:
IOException

read

public int read(ByteBuffer buffer)
         throws IOException
Specified by:
read in interface Location
Throws:
IOException

read

public int read(byte[] buffer)
         throws IOException
Specified by:
read in interface Location
Throws:
IOException

getInputStream

public InputStream getInputStream()
                           throws IOException
Specified by:
getInputStream in interface Location
Throws:
IOException


Copyright © 2002-2007 The Apache Software Foundation. All Rights Reserved.