I got what i was looking for from KC.this is how i did it
//Add a document to Livelink
//this example gets a document from enterprise you have to specify
//folder id and nodeid
//import classes
import com.opentext.api.*;
public class GetDocument
{
private static String Server = "localhost"; //livelink host
private static int Port = 5555; //livelink server port see opentext.ini
private static String DFT = ""; //default database file or schema
private static String User = "Admin"; //username
private static String Pass = "123admin"; //passwd
public static void main (String [] args)
{
try
{
//variables
LLSession session;
LAPI_DOCUMENTS doc;
session = new LLSession (Server, Port, DFT, User, Pass);
doc = new LAPI_DOCUMENTS (session);
int volID, objID,versionID;
String FilePath;
volID = -2000;//Parent VolumeID usually enterprise workspace
objID = 9672;//unique number of an existing document
versionID=0;//currentversion
FilePath = "C:\\livelinkfolders\\text.txt";
//Add the Document
if (doc.FetchVersion(volID, objID, versionID, FilePath) == 0)
{
System.out.println("Document Fetched Successfully"

;
}
else
{
System.out.println("Failed to fetch Document"

;
//Error Checking
System.out.println("Status Code: " + session.getStatus());
System.out.println("Api Error: " + session.getApiError());
System.out.println("Error Message: " + session.getErrMsg());
System.out.println("Status Message: " + session.getStatusMessage());
}
}
catch (Throwable e)
{
System.err.println(e.getMessage() );
e.printStackTrace (System.err);
}
}
}