com.esri.arcgis.carto
Interface ILayerFile

All Superinterfaces:
Serializable
All Known Implementing Classes:
LayerFile

public interface ILayerFile
extends Serializable

Provides access to members that control the reading and writing of layer document files.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


Method Summary
 void close()
          Close the layer file.
 void esri_new(String sFile)
          Creates and opens a new layer File in preparation for the contents to be retrieve or updated.
 String getFilename()
          The name of the layer file that the LayerFile coclass is linked to.
 ILayer getLayer()
          The Layer object.
 IPicture getThumbnail()
          The thumbnail stored in the layer file.
 boolean isLayerFile(String sFile)
          Indicates if the file is a valid layer file.
 boolean isPresent(String sFile)
          Indicates if the layer file is present.
 boolean isReadOnly(String sFile)
          Indicates if the layer file is read only.
 void open(String sFile)
          Open the layer file in preparation for the contents to be retrieved or updated.
 void replaceContents(ILayer pLayer)
          Replace the contents of the layer file.
 void save()
          Save the contents of the layer file to the bound file.
 void saveAs(String sFile)
          Save the contents of the layer file to the specified file name.
 

Method Detail

getFilename

String getFilename()
                   throws IOException,
                          AutomationException
The name of the layer file that the LayerFile coclass is linked to.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
The sFile
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isLayerFile

boolean isLayerFile(String sFile)
                    throws IOException,
                           AutomationException
Indicates if the file is a valid layer file.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
sFile - The sFile (in)
Returns:
The isLayerFile
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isPresent

boolean isPresent(String sFile)
                  throws IOException,
                         AutomationException
Indicates if the layer file is present.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
sFile - The sFile (in)
Returns:
The isPresent
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isReadOnly

boolean isReadOnly(String sFile)
                   throws IOException,
                          AutomationException
Indicates if the layer file is read only.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
sFile - The sFile (in)
Returns:
The isReadOnly
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLayer

ILayer getLayer()
                throws IOException,
                       AutomationException
The Layer object. If no layer object is stored in the layer file this returns NULL.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A reference to a com.esri.arcgis.carto.ILayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getThumbnail

IPicture getThumbnail()
                      throws IOException,
                             AutomationException
The thumbnail stored in the layer file. If this is empty E_FAIL is returned.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A reference to a com.esri.arcgis.support.ms.stdole.IPicture
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_new

void esri_new(String sFile)
              throws IOException,
                     AutomationException
Creates and opens a new layer File in preparation for the contents to be retrieve or updated.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
sFile - The sFile (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

open

void open(String sFile)
          throws IOException,
                 AutomationException
Open the layer file in preparation for the contents to be retrieved or updated.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
sFile - The sFile (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

close

void close()
           throws IOException,
                  AutomationException
Close the layer file.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

replaceContents

void replaceContents(ILayer pLayer)
                     throws IOException,
                            AutomationException
Replace the contents of the layer file.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
pLayer - A reference to a com.esri.arcgis.carto.ILayer (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

save

void save()
          throws IOException,
                 AutomationException
Save the contents of the layer file to the bound file.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

saveAs

void saveAs(String sFile)
            throws IOException,
                   AutomationException
Save the contents of the layer file to the specified file name.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
sFile - The sFile (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.