Package jcifs.smb

Examples of jcifs.smb.SmbFile.lastModified()


      SmbFile smbFile = RegainToolkit.urlToSmbFile(
        CrawlerToolkit.replaceAuthenticationValuesInURL(url, mAccountPasswordEntry));
   
      if( smbFile.canRead() && !smbFile.isDirectory() ) {
        in = smbFile.getInputStream();
        mLastModifiedDate = new Date(smbFile.lastModified());
       
        return CrawlerToolkit.loadFileFromStream(in,smbFile.getContentLength());
       
      } else {
        throw new RegainException("Can't load content from: "
View Full Code Here


public class GetDate {

    public static void main( String argv[] ) throws Exception {
        SmbFile f = new SmbFile( argv[0] );
        Date d = new Date( f.lastModified() );
        SimpleDateFormat sdf = new SimpleDateFormat( "EEEE, MMMM d, yyyy h:mm:ss a" );
        sdf.setCalendar( new GregorianCalendar() );
        System.out.println( sdf.format( d ));
    }
}
View Full Code Here

                        rd.setBinary(inputStream, tempFile.length());
                        rd.setFileName(file.getName());
                        String contentType = mapExtensionToMimeType(file.getName());
                        if (contentType != null)
                          rd.setMimeType(contentType);
                        rd.addField("lastModified", new Date(file.lastModified()).toString());
                        int index = 0;
                        index = setDocumentSecurity(rd,version,index);
                        index = setPathMetadata(rd,version,index);
                        StringBuilder ingestURI = new StringBuilder();
                        index = unpack(ingestURI,version,index,'+');
View Full Code Here

                    rd.setBinary(inputStream, fileLength(file));
                    rd.setFileName(file.getName());
                    String contentType = mapExtensionToMimeType(file.getName());
                    if (contentType != null)
                      rd.setMimeType(contentType);
                    rd.addField("lastModified", new Date(file.lastModified()).toString());
                    int index = 0;
                    index = setDocumentSecurity(rd,version,index);
                    index = setPathMetadata(rd,version,index);
                    StringBuilder ingestURI = new StringBuilder();
                    index = unpack(ingestURI,version,index,'+');
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.