public class XamlFixedSaveOptions extends FixedPageSaveOptions
SaveFormat.XAML_FIXED format.
To learn more, visit the Specify Save Options documentation article.
Examples:
Shows how to print the URIs of linked resources created while converting a document to fixed-form .xaml.
public void resourceFolder() throws Exception {
Document doc = new Document(getMyDir() + "Rendering.docx");
ResourceUriPrinter callback = new ResourceUriPrinter();
// Create a "XamlFixedSaveOptions" object, which we can pass to the document's "Save" method
// to modify how we save the document to the XAML save format.
XamlFixedSaveOptions options = new XamlFixedSaveOptions();
Assert.assertEquals(SaveFormat.XAML_FIXED, options.getSaveFormat());
// Use the "ResourcesFolder" property to assign a folder in the local file system into which
// Aspose.Words will save all the document's linked resources, such as images and fonts.
options.setResourcesFolder(getArtifactsDir() + "XamlFixedResourceFolder");
// Use the "ResourcesFolderAlias" property to use this folder
// when constructing image URIs instead of the resources folder's name.
options.setResourcesFolderAlias(getArtifactsDir() + "XamlFixedFolderAlias");
options.setResourceSavingCallback(callback);
// A folder specified by "ResourcesFolderAlias" will need to contain the resources instead of "ResourcesFolder".
// We must ensure the folder exists before the callback's streams can put their resources into it.
new File(options.getResourcesFolderAlias()).mkdir();
doc.save(getArtifactsDir() + "XamlFixedSaveOptions.ResourceFolder.xaml", options);
for (String resource : callback.getResources())
System.out.println(resource);
}
/// <summary>
/// Counts and prints URIs of resources created during conversion to fixed .xaml.
/// </summary>
private static class ResourceUriPrinter implements IResourceSavingCallback {
public ResourceUriPrinter() {
mResources = new ArrayList<>();
}
public void resourceSaving(ResourceSavingArgs args) throws Exception {
getResources().add(MessageFormat.format("Resource \"{0}\"\n\t{1}", args.getResourceFileName(), args.getResourceFileUri()));
// If we specified a resource folder alias, we would also need
// to redirect each stream to put its resource in the alias folder.
args.setResourceStream(new FileOutputStream(args.getResourceFileUri()));
args.setKeepResourceStreamOpen(false);
}
public ArrayList<String> getResources() {
return mResources;
}
private final ArrayList<String> mResources;
}
| Modifier and Type | Method and Description |
|---|---|
IResourceSavingCallback |
getResourceSavingCallback()
Allows to control how resources (images and fonts) are saved when a document is exported to fixed page Xaml format.
|
java.lang.String |
getResourcesFolder()
Specifies the physical folder where resources (images and fonts) are saved when exporting a document to fixed page Xaml format.
|
java.lang.String |
getResourcesFolderAlias()
Specifies the name of the folder used to construct image URIs written into an fixed page Xaml document.
|
int |
getSaveFormat()
Specifies the format in which the document will be saved if this save options object is used.
|
void |
setResourceSavingCallback(IResourceSavingCallback value)
Allows to control how resources (images and fonts) are saved when a document is exported to fixed page Xaml format.
|
void |
setResourcesFolder(java.lang.String value)
Specifies the physical folder where resources (images and fonts) are saved when exporting a document to fixed page Xaml format.
|
void |
setResourcesFolderAlias(java.lang.String value)
Specifies the name of the folder used to construct image URIs written into an fixed page Xaml document.
|
void |
setSaveFormat(int value)
Specifies the format in which the document will be saved if this save options object is used.
|
assertValidIdPrefix, equals, getColorMode, getJpegQuality, getMetafileRenderingOptions, getNumeralFormat, getOptimizeOutput, getPageSavingCallback, getPageSet, isValidIdPrefix, setColorMode, setJpegQuality, setMetafileRenderingOptions, setNumeralFormat, setOptimizeOutput, setPageSavingCallback, setPageSetcreateSaveOptions, createSaveOptions, getAllowEmbeddingPostScriptFonts, getCustomTimeZoneInfo, getDefaultTemplate, getDml3DEffectsRenderingMode, getDmlEffectsRenderingMode, getDmlRenderingMode, getExportGeneratorName, getImlRenderingMode, getMemoryOptimization, getPrettyFormat, getProgressCallback, getTempFolder, getUpdateAmbiguousTextFont, getUpdateCreatedTimeProperty, getUpdateFields, getUpdateLastPrintedProperty, getUpdateLastSavedTimeProperty, getUseAntiAliasing, getUseHighQualityRendering, setAllowEmbeddingPostScriptFonts, setCustomTimeZoneInfo, setDefaultTemplate, setDml3DEffectsRenderingMode, setDmlEffectsRenderingMode, setDmlRenderingMode, setExportGeneratorName, setImlRenderingMode, setMemoryOptimization, setPrettyFormat, setProgressCallback, setTempFolder, setUpdateAmbiguousTextFont, setUpdateCreatedTimeProperty, setUpdateFields, setUpdateLastPrintedProperty, setUpdateLastSavedTimeProperty, setUseAntiAliasing, setUseHighQualityRenderingpublic int getSaveFormat()
SaveFormat.XAML_FIXED.
Examples:
Shows how to print the URIs of linked resources created while converting a document to fixed-form .xaml.
public void resourceFolder() throws Exception {
Document doc = new Document(getMyDir() + "Rendering.docx");
ResourceUriPrinter callback = new ResourceUriPrinter();
// Create a "XamlFixedSaveOptions" object, which we can pass to the document's "Save" method
// to modify how we save the document to the XAML save format.
XamlFixedSaveOptions options = new XamlFixedSaveOptions();
Assert.assertEquals(SaveFormat.XAML_FIXED, options.getSaveFormat());
// Use the "ResourcesFolder" property to assign a folder in the local file system into which
// Aspose.Words will save all the document's linked resources, such as images and fonts.
options.setResourcesFolder(getArtifactsDir() + "XamlFixedResourceFolder");
// Use the "ResourcesFolderAlias" property to use this folder
// when constructing image URIs instead of the resources folder's name.
options.setResourcesFolderAlias(getArtifactsDir() + "XamlFixedFolderAlias");
options.setResourceSavingCallback(callback);
// A folder specified by "ResourcesFolderAlias" will need to contain the resources instead of "ResourcesFolder".
// We must ensure the folder exists before the callback's streams can put their resources into it.
new File(options.getResourcesFolderAlias()).mkdir();
doc.save(getArtifactsDir() + "XamlFixedSaveOptions.ResourceFolder.xaml", options);
for (String resource : callback.getResources())
System.out.println(resource);
}
/// <summary>
/// Counts and prints URIs of resources created during conversion to fixed .xaml.
/// </summary>
private static class ResourceUriPrinter implements IResourceSavingCallback {
public ResourceUriPrinter() {
mResources = new ArrayList<>();
}
public void resourceSaving(ResourceSavingArgs args) throws Exception {
getResources().add(MessageFormat.format("Resource \"{0}\"\n\t{1}", args.getResourceFileName(), args.getResourceFileUri()));
// If we specified a resource folder alias, we would also need
// to redirect each stream to put its resource in the alias folder.
args.setResourceStream(new FileOutputStream(args.getResourceFileUri()));
args.setKeepResourceStreamOpen(false);
}
public ArrayList<String> getResources() {
return mResources;
}
private final ArrayList<String> mResources;
}
getSaveFormat in class SaveOptionsint value. The returned value is one of SaveFormat constants.public void setSaveFormat(int value)
SaveFormat.XAML_FIXED.
Examples:
Shows how to print the URIs of linked resources created while converting a document to fixed-form .xaml.
public void resourceFolder() throws Exception {
Document doc = new Document(getMyDir() + "Rendering.docx");
ResourceUriPrinter callback = new ResourceUriPrinter();
// Create a "XamlFixedSaveOptions" object, which we can pass to the document's "Save" method
// to modify how we save the document to the XAML save format.
XamlFixedSaveOptions options = new XamlFixedSaveOptions();
Assert.assertEquals(SaveFormat.XAML_FIXED, options.getSaveFormat());
// Use the "ResourcesFolder" property to assign a folder in the local file system into which
// Aspose.Words will save all the document's linked resources, such as images and fonts.
options.setResourcesFolder(getArtifactsDir() + "XamlFixedResourceFolder");
// Use the "ResourcesFolderAlias" property to use this folder
// when constructing image URIs instead of the resources folder's name.
options.setResourcesFolderAlias(getArtifactsDir() + "XamlFixedFolderAlias");
options.setResourceSavingCallback(callback);
// A folder specified by "ResourcesFolderAlias" will need to contain the resources instead of "ResourcesFolder".
// We must ensure the folder exists before the callback's streams can put their resources into it.
new File(options.getResourcesFolderAlias()).mkdir();
doc.save(getArtifactsDir() + "XamlFixedSaveOptions.ResourceFolder.xaml", options);
for (String resource : callback.getResources())
System.out.println(resource);
}
/// <summary>
/// Counts and prints URIs of resources created during conversion to fixed .xaml.
/// </summary>
private static class ResourceUriPrinter implements IResourceSavingCallback {
public ResourceUriPrinter() {
mResources = new ArrayList<>();
}
public void resourceSaving(ResourceSavingArgs args) throws Exception {
getResources().add(MessageFormat.format("Resource \"{0}\"\n\t{1}", args.getResourceFileName(), args.getResourceFileUri()));
// If we specified a resource folder alias, we would also need
// to redirect each stream to put its resource in the alias folder.
args.setResourceStream(new FileOutputStream(args.getResourceFileUri()));
args.setKeepResourceStreamOpen(false);
}
public ArrayList<String> getResources() {
return mResources;
}
private final ArrayList<String> mResources;
}
setSaveFormat in class SaveOptionsvalue - The corresponding int value. The value must be one of SaveFormat constants.public java.lang.String getResourcesFolder()
null.
Remarks:
When you save a Document in fixed page Xaml format, Aspose.Words needs to save all images embedded in the document as standalone files. getResourcesFolder() / setResourcesFolder(java.lang.String) allows you to specify where the images will be saved and getResourcesFolderAlias() / setResourcesFolderAlias(java.lang.String) allows to specify how the image URIs will be constructed.
If you save a document into a file and provide a file name, Aspose.Words, by default, saves the images in the same folder where the document file is saved. Use getResourcesFolder() / setResourcesFolder(java.lang.String) to override this behavior.
If you save a document into a stream, Aspose.Words does not have a folder where to save the images, but still needs to save the images somewhere. In this case, you need to specify an accessible folder by using the getResourcesFolder() / setResourcesFolder(java.lang.String) property
Examples:
Shows how to print the URIs of linked resources created while converting a document to fixed-form .xaml.
public void resourceFolder() throws Exception {
Document doc = new Document(getMyDir() + "Rendering.docx");
ResourceUriPrinter callback = new ResourceUriPrinter();
// Create a "XamlFixedSaveOptions" object, which we can pass to the document's "Save" method
// to modify how we save the document to the XAML save format.
XamlFixedSaveOptions options = new XamlFixedSaveOptions();
Assert.assertEquals(SaveFormat.XAML_FIXED, options.getSaveFormat());
// Use the "ResourcesFolder" property to assign a folder in the local file system into which
// Aspose.Words will save all the document's linked resources, such as images and fonts.
options.setResourcesFolder(getArtifactsDir() + "XamlFixedResourceFolder");
// Use the "ResourcesFolderAlias" property to use this folder
// when constructing image URIs instead of the resources folder's name.
options.setResourcesFolderAlias(getArtifactsDir() + "XamlFixedFolderAlias");
options.setResourceSavingCallback(callback);
// A folder specified by "ResourcesFolderAlias" will need to contain the resources instead of "ResourcesFolder".
// We must ensure the folder exists before the callback's streams can put their resources into it.
new File(options.getResourcesFolderAlias()).mkdir();
doc.save(getArtifactsDir() + "XamlFixedSaveOptions.ResourceFolder.xaml", options);
for (String resource : callback.getResources())
System.out.println(resource);
}
/// <summary>
/// Counts and prints URIs of resources created during conversion to fixed .xaml.
/// </summary>
private static class ResourceUriPrinter implements IResourceSavingCallback {
public ResourceUriPrinter() {
mResources = new ArrayList<>();
}
public void resourceSaving(ResourceSavingArgs args) throws Exception {
getResources().add(MessageFormat.format("Resource \"{0}\"\n\t{1}", args.getResourceFileName(), args.getResourceFileUri()));
// If we specified a resource folder alias, we would also need
// to redirect each stream to put its resource in the alias folder.
args.setResourceStream(new FileOutputStream(args.getResourceFileUri()));
args.setKeepResourceStreamOpen(false);
}
public ArrayList<String> getResources() {
return mResources;
}
private final ArrayList<String> mResources;
}
String value.getResourcesFolderAlias(),
setResourcesFolderAlias(java.lang.String)public void setResourcesFolder(java.lang.String value)
null.
Remarks:
When you save a Document in fixed page Xaml format, Aspose.Words needs to save all images embedded in the document as standalone files. getResourcesFolder() / setResourcesFolder(java.lang.String) allows you to specify where the images will be saved and getResourcesFolderAlias() / setResourcesFolderAlias(java.lang.String) allows to specify how the image URIs will be constructed.
If you save a document into a file and provide a file name, Aspose.Words, by default, saves the images in the same folder where the document file is saved. Use getResourcesFolder() / setResourcesFolder(java.lang.String) to override this behavior.
If you save a document into a stream, Aspose.Words does not have a folder where to save the images, but still needs to save the images somewhere. In this case, you need to specify an accessible folder by using the getResourcesFolder() / setResourcesFolder(java.lang.String) property
Examples:
Shows how to print the URIs of linked resources created while converting a document to fixed-form .xaml.
public void resourceFolder() throws Exception {
Document doc = new Document(getMyDir() + "Rendering.docx");
ResourceUriPrinter callback = new ResourceUriPrinter();
// Create a "XamlFixedSaveOptions" object, which we can pass to the document's "Save" method
// to modify how we save the document to the XAML save format.
XamlFixedSaveOptions options = new XamlFixedSaveOptions();
Assert.assertEquals(SaveFormat.XAML_FIXED, options.getSaveFormat());
// Use the "ResourcesFolder" property to assign a folder in the local file system into which
// Aspose.Words will save all the document's linked resources, such as images and fonts.
options.setResourcesFolder(getArtifactsDir() + "XamlFixedResourceFolder");
// Use the "ResourcesFolderAlias" property to use this folder
// when constructing image URIs instead of the resources folder's name.
options.setResourcesFolderAlias(getArtifactsDir() + "XamlFixedFolderAlias");
options.setResourceSavingCallback(callback);
// A folder specified by "ResourcesFolderAlias" will need to contain the resources instead of "ResourcesFolder".
// We must ensure the folder exists before the callback's streams can put their resources into it.
new File(options.getResourcesFolderAlias()).mkdir();
doc.save(getArtifactsDir() + "XamlFixedSaveOptions.ResourceFolder.xaml", options);
for (String resource : callback.getResources())
System.out.println(resource);
}
/// <summary>
/// Counts and prints URIs of resources created during conversion to fixed .xaml.
/// </summary>
private static class ResourceUriPrinter implements IResourceSavingCallback {
public ResourceUriPrinter() {
mResources = new ArrayList<>();
}
public void resourceSaving(ResourceSavingArgs args) throws Exception {
getResources().add(MessageFormat.format("Resource \"{0}\"\n\t{1}", args.getResourceFileName(), args.getResourceFileUri()));
// If we specified a resource folder alias, we would also need
// to redirect each stream to put its resource in the alias folder.
args.setResourceStream(new FileOutputStream(args.getResourceFileUri()));
args.setKeepResourceStreamOpen(false);
}
public ArrayList<String> getResources() {
return mResources;
}
private final ArrayList<String> mResources;
}
value - The corresponding String value.getResourcesFolderAlias(),
setResourcesFolderAlias(java.lang.String)public java.lang.String getResourcesFolderAlias()
null.
Remarks:
When you save a Document in fixed page Xaml format, Aspose.Words needs to save all images embedded in the document as standalone files. getResourcesFolder() / setResourcesFolder(java.lang.String) allows you to specify where the images will be saved and getResourcesFolderAlias() / setResourcesFolderAlias(java.lang.String) allows to specify how the image URIs will be constructed.
Examples:
Shows how to print the URIs of linked resources created while converting a document to fixed-form .xaml.
public void resourceFolder() throws Exception {
Document doc = new Document(getMyDir() + "Rendering.docx");
ResourceUriPrinter callback = new ResourceUriPrinter();
// Create a "XamlFixedSaveOptions" object, which we can pass to the document's "Save" method
// to modify how we save the document to the XAML save format.
XamlFixedSaveOptions options = new XamlFixedSaveOptions();
Assert.assertEquals(SaveFormat.XAML_FIXED, options.getSaveFormat());
// Use the "ResourcesFolder" property to assign a folder in the local file system into which
// Aspose.Words will save all the document's linked resources, such as images and fonts.
options.setResourcesFolder(getArtifactsDir() + "XamlFixedResourceFolder");
// Use the "ResourcesFolderAlias" property to use this folder
// when constructing image URIs instead of the resources folder's name.
options.setResourcesFolderAlias(getArtifactsDir() + "XamlFixedFolderAlias");
options.setResourceSavingCallback(callback);
// A folder specified by "ResourcesFolderAlias" will need to contain the resources instead of "ResourcesFolder".
// We must ensure the folder exists before the callback's streams can put their resources into it.
new File(options.getResourcesFolderAlias()).mkdir();
doc.save(getArtifactsDir() + "XamlFixedSaveOptions.ResourceFolder.xaml", options);
for (String resource : callback.getResources())
System.out.println(resource);
}
/// <summary>
/// Counts and prints URIs of resources created during conversion to fixed .xaml.
/// </summary>
private static class ResourceUriPrinter implements IResourceSavingCallback {
public ResourceUriPrinter() {
mResources = new ArrayList<>();
}
public void resourceSaving(ResourceSavingArgs args) throws Exception {
getResources().add(MessageFormat.format("Resource \"{0}\"\n\t{1}", args.getResourceFileName(), args.getResourceFileUri()));
// If we specified a resource folder alias, we would also need
// to redirect each stream to put its resource in the alias folder.
args.setResourceStream(new FileOutputStream(args.getResourceFileUri()));
args.setKeepResourceStreamOpen(false);
}
public ArrayList<String> getResources() {
return mResources;
}
private final ArrayList<String> mResources;
}
String value.getResourcesFolder(),
setResourcesFolder(java.lang.String)public void setResourcesFolderAlias(java.lang.String value)
null.
Remarks:
When you save a Document in fixed page Xaml format, Aspose.Words needs to save all images embedded in the document as standalone files. getResourcesFolder() / setResourcesFolder(java.lang.String) allows you to specify where the images will be saved and getResourcesFolderAlias() / setResourcesFolderAlias(java.lang.String) allows to specify how the image URIs will be constructed.
Examples:
Shows how to print the URIs of linked resources created while converting a document to fixed-form .xaml.
public void resourceFolder() throws Exception {
Document doc = new Document(getMyDir() + "Rendering.docx");
ResourceUriPrinter callback = new ResourceUriPrinter();
// Create a "XamlFixedSaveOptions" object, which we can pass to the document's "Save" method
// to modify how we save the document to the XAML save format.
XamlFixedSaveOptions options = new XamlFixedSaveOptions();
Assert.assertEquals(SaveFormat.XAML_FIXED, options.getSaveFormat());
// Use the "ResourcesFolder" property to assign a folder in the local file system into which
// Aspose.Words will save all the document's linked resources, such as images and fonts.
options.setResourcesFolder(getArtifactsDir() + "XamlFixedResourceFolder");
// Use the "ResourcesFolderAlias" property to use this folder
// when constructing image URIs instead of the resources folder's name.
options.setResourcesFolderAlias(getArtifactsDir() + "XamlFixedFolderAlias");
options.setResourceSavingCallback(callback);
// A folder specified by "ResourcesFolderAlias" will need to contain the resources instead of "ResourcesFolder".
// We must ensure the folder exists before the callback's streams can put their resources into it.
new File(options.getResourcesFolderAlias()).mkdir();
doc.save(getArtifactsDir() + "XamlFixedSaveOptions.ResourceFolder.xaml", options);
for (String resource : callback.getResources())
System.out.println(resource);
}
/// <summary>
/// Counts and prints URIs of resources created during conversion to fixed .xaml.
/// </summary>
private static class ResourceUriPrinter implements IResourceSavingCallback {
public ResourceUriPrinter() {
mResources = new ArrayList<>();
}
public void resourceSaving(ResourceSavingArgs args) throws Exception {
getResources().add(MessageFormat.format("Resource \"{0}\"\n\t{1}", args.getResourceFileName(), args.getResourceFileUri()));
// If we specified a resource folder alias, we would also need
// to redirect each stream to put its resource in the alias folder.
args.setResourceStream(new FileOutputStream(args.getResourceFileUri()));
args.setKeepResourceStreamOpen(false);
}
public ArrayList<String> getResources() {
return mResources;
}
private final ArrayList<String> mResources;
}
value - The corresponding String value.getResourcesFolder(),
setResourcesFolder(java.lang.String)public IResourceSavingCallback getResourceSavingCallback()
Examples:
Shows how to print the URIs of linked resources created while converting a document to fixed-form .xaml.
public void resourceFolder() throws Exception {
Document doc = new Document(getMyDir() + "Rendering.docx");
ResourceUriPrinter callback = new ResourceUriPrinter();
// Create a "XamlFixedSaveOptions" object, which we can pass to the document's "Save" method
// to modify how we save the document to the XAML save format.
XamlFixedSaveOptions options = new XamlFixedSaveOptions();
Assert.assertEquals(SaveFormat.XAML_FIXED, options.getSaveFormat());
// Use the "ResourcesFolder" property to assign a folder in the local file system into which
// Aspose.Words will save all the document's linked resources, such as images and fonts.
options.setResourcesFolder(getArtifactsDir() + "XamlFixedResourceFolder");
// Use the "ResourcesFolderAlias" property to use this folder
// when constructing image URIs instead of the resources folder's name.
options.setResourcesFolderAlias(getArtifactsDir() + "XamlFixedFolderAlias");
options.setResourceSavingCallback(callback);
// A folder specified by "ResourcesFolderAlias" will need to contain the resources instead of "ResourcesFolder".
// We must ensure the folder exists before the callback's streams can put their resources into it.
new File(options.getResourcesFolderAlias()).mkdir();
doc.save(getArtifactsDir() + "XamlFixedSaveOptions.ResourceFolder.xaml", options);
for (String resource : callback.getResources())
System.out.println(resource);
}
/// <summary>
/// Counts and prints URIs of resources created during conversion to fixed .xaml.
/// </summary>
private static class ResourceUriPrinter implements IResourceSavingCallback {
public ResourceUriPrinter() {
mResources = new ArrayList<>();
}
public void resourceSaving(ResourceSavingArgs args) throws Exception {
getResources().add(MessageFormat.format("Resource \"{0}\"\n\t{1}", args.getResourceFileName(), args.getResourceFileUri()));
// If we specified a resource folder alias, we would also need
// to redirect each stream to put its resource in the alias folder.
args.setResourceStream(new FileOutputStream(args.getResourceFileUri()));
args.setKeepResourceStreamOpen(false);
}
public ArrayList<String> getResources() {
return mResources;
}
private final ArrayList<String> mResources;
}
IResourceSavingCallback value.public void setResourceSavingCallback(IResourceSavingCallback value)
Examples:
Shows how to print the URIs of linked resources created while converting a document to fixed-form .xaml.
public void resourceFolder() throws Exception {
Document doc = new Document(getMyDir() + "Rendering.docx");
ResourceUriPrinter callback = new ResourceUriPrinter();
// Create a "XamlFixedSaveOptions" object, which we can pass to the document's "Save" method
// to modify how we save the document to the XAML save format.
XamlFixedSaveOptions options = new XamlFixedSaveOptions();
Assert.assertEquals(SaveFormat.XAML_FIXED, options.getSaveFormat());
// Use the "ResourcesFolder" property to assign a folder in the local file system into which
// Aspose.Words will save all the document's linked resources, such as images and fonts.
options.setResourcesFolder(getArtifactsDir() + "XamlFixedResourceFolder");
// Use the "ResourcesFolderAlias" property to use this folder
// when constructing image URIs instead of the resources folder's name.
options.setResourcesFolderAlias(getArtifactsDir() + "XamlFixedFolderAlias");
options.setResourceSavingCallback(callback);
// A folder specified by "ResourcesFolderAlias" will need to contain the resources instead of "ResourcesFolder".
// We must ensure the folder exists before the callback's streams can put their resources into it.
new File(options.getResourcesFolderAlias()).mkdir();
doc.save(getArtifactsDir() + "XamlFixedSaveOptions.ResourceFolder.xaml", options);
for (String resource : callback.getResources())
System.out.println(resource);
}
/// <summary>
/// Counts and prints URIs of resources created during conversion to fixed .xaml.
/// </summary>
private static class ResourceUriPrinter implements IResourceSavingCallback {
public ResourceUriPrinter() {
mResources = new ArrayList<>();
}
public void resourceSaving(ResourceSavingArgs args) throws Exception {
getResources().add(MessageFormat.format("Resource \"{0}\"\n\t{1}", args.getResourceFileName(), args.getResourceFileUri()));
// If we specified a resource folder alias, we would also need
// to redirect each stream to put its resource in the alias folder.
args.setResourceStream(new FileOutputStream(args.getResourceFileUri()));
args.setKeepResourceStreamOpen(false);
}
public ArrayList<String> getResources() {
return mResources;
}
private final ArrayList<String> mResources;
}
value - The corresponding IResourceSavingCallback value.