You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2019/01/25 14:27:36 UTC
svn commit: r1852137 - /commons/proper/vfs/trunk/src/site/xdoc/api.xml
Author: ggregory
Date: Fri Jan 25 14:27:36 2019
New Revision: 1852137
URL: http://svn.apache.org/viewvc?rev=1852137&view=rev
Log:
Better formatting for code example.
Modified:
commons/proper/vfs/trunk/src/site/xdoc/api.xml
Modified: commons/proper/vfs/trunk/src/site/xdoc/api.xml
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/src/site/xdoc/api.xml?rev=1852137&r1=1852136&r2=1852137&view=diff
==============================================================================
--- commons/proper/vfs/trunk/src/site/xdoc/api.xml (original)
+++ commons/proper/vfs/trunk/src/site/xdoc/api.xml Fri Jan 25 14:27:36 2019
@@ -68,7 +68,7 @@ for ( int i = 0; i < children.length; i+
{
System.out.println( children[ i ].getName().getBaseName() );
}
- ]]></source>
+]]></source>
<p>
In some cases you might want to explicitely free resources allocated by the filesystem.
@@ -116,14 +116,14 @@ for ( int i = 0; i < children.length; i+
</p>
<p>
For example:
- <code>
- StaticUserAuthenticator auth = new StaticUserAuthenticator("domain", "username", "password");
- FileSystemOptions opts = new FileSystemOptions();
- DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(opts, auth);
-
- FileObject fo = VFS.getManager().resolveFile("smb://host/anyshare/dir", opts);
- </code>
</p>
+ <source><![CDATA[
+StaticUserAuthenticator auth = new StaticUserAuthenticator("domain", "username", "password");
+FileSystemOptions opts = new FileSystemOptions();
+DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(opts, auth);
+
+FileObject fo = VFS.getManager().resolveFile("smb://host/anyshare/dir", opts);
+]]></source>
<p>
Internally the UserAuthenticator uses char arrays which will be zeroed before it is
freed for garbage collection.Unhappily none of the current libraries use char
@@ -372,7 +372,7 @@ for ( int i = 0; i < children.length; i+
</provider>
<default-provider class-name="org.apache.commons.vfs2.provider.url.UrlFileProvider"/>
</providers>
- ]]></source>
+]]></source>
</subsection>
</section>
</body>