Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java view on Meta::CPAN
/**
* @copyright
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
* @endcopyright
*/
package org.apache.subversion.javahl;
import org.apache.subversion.javahl.callback.*;
import org.apache.subversion.javahl.types.*;
import java.io.OutputStream;
import java.io.FileOutputStream;
import java.io.FileNotFoundException;
import java.io.ByteArrayOutputStream;
import java.util.Collection;
import java.util.Set;
import java.util.List;
import java.util.Map;
/**
* This is the main client class. All Subversion client APIs are
* implemented in this class. This class is not threadsafe; if you
* need threadsafe access, use ClientSynchronized.
*/
public class SVNClient implements ISVNClient
{
/**
* Load the required native library.
*/
static
{
NativeResources.loadNativeLibrary();
}
/**
* Standard empty contructor, builds just the native peer.
*/
public SVNClient()
{
cppAddr = ctNative();
// Ensure that Subversion's config file area and templates exist.
try
{
setConfigDirectory(null);
}
catch (ClientException suppressed)
{
// Not an exception-worthy problem, continue on.
}
}
private long getCppAddr()
{
return cppAddr;
}
/**
* Build the native peer
* @return the adress of the peer
*/
private native long ctNative();
/**
* release the native peer (should not depend on finalize)
*/
public native void dispose();
/**
* release the native peer (should use dispose instead)
*/
public native void finalize();
/**
* slot for the adress of the native peer. The JNI code is the only user
* of this member
*/
protected long cppAddr;
private ClientContext clientContext = new ClientContext();
public Version getVersion()
{
( run in 0.804 second using v1.01-cache-2.11-cpan-796a6f069b2 )