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

    java.lang.Object
      org.apache.maven.shared.io.location.FileLocation

All Implemented Interfaces:
  Location

Direct Known Subclasses:
  ArtifactLocation, URLLocation

    public class FileLocation

extends java.lang.Object
implements Location

Constructor Summary
`` `FileLocation(java.io.File file, java.lang.String specification)`
`protected` `FileLocation(java.lang.String specification)`

Method Summary
`void` `close()`
`java.io.File` `getFile()`
`java.io.InputStream` `getInputStream()`
`java.lang.String` `getSpecification()`
`protected void` `initFile()`
`void` `open()`
`int` `read(byte[] buffer)`
`int` `read(java.nio.ByteBuffer buffer)`
`protected void` `setFile(java.io.File file)`
`protected java.io.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(java.io.File file,
                        java.lang.String specification)

### FileLocation

    protected FileLocation(java.lang.String specification)

Method Detail

### close

    public void close()

  Specified by:
    `close` in interface `Location`

### getFile

    public java.io.File getFile()
                         throws java.io.IOException

  Specified by:
    `getFile` in interface `Location`
  Throws:
    `java.io.IOException`

### unsafeGetFile

    protected java.io.File unsafeGetFile()

### initFile

    protected void initFile()
                     throws java.io.IOException

  Throws:
    `java.io.IOException`

### setFile

    protected void setFile(java.io.File file)

### getSpecification

    public java.lang.String getSpecification()

  Specified by:
    `getSpecification` in interface `Location`

### open

    public void open()
              throws java.io.IOException

  Specified by:
    `open` in interface `Location`
  Throws:
    `java.io.IOException`

### read

    public int read(java.nio.ByteBuffer buffer)
             throws java.io.IOException

  Specified by:
    `read` in interface `Location`
  Throws:
    `java.io.IOException`

### read

    public int read(byte[] buffer)
             throws java.io.IOException

  Specified by:
    `read` in interface `Location`
  Throws:
    `java.io.IOException`

### getInputStream

    public java.io.InputStream getInputStream()
                                       throws java.io.IOException

  Specified by:
    `getInputStream` in interface `Location`
  Throws:
    `java.io.IOException`

Copyright © 2011. All Rights Reserved.