Package com.dotcms.repackage.org.apache.chemistry.opencmis.commons.impl.dataobjects

Examples of com.dotcms.repackage.org.apache.chemistry.opencmis.commons.impl.dataobjects.ContentStreamImpl


        if ( !resourceFile.exists() ) {
            String message = "File " + fileName + " does not exist.";
            throw new Exception( message );
        }
       
        ContentStreamImpl contentStream = new ContentStreamImpl();
        contentStream.setFileName(fileName + new java.util.Date().getTime());
        contentStream.setLength(BigInteger.valueOf(resourceFile.length()));
        contentStream.setMimeType(APILocator.getFileAPI().getMimeType(fileName));
        contentStream.setStream(new FileInputStream(resourceFile));
               
        PropertiesImpl result = new PropertiesImpl();
        result.addProperty(new PropertyIdImpl(PropertyIds.OBJECT_TYPE_ID, BaseTypeId.CMIS_DOCUMENT.value()));
        result.addProperty(new PropertyStringImpl(PropertyIds.NAME, fileName));
View Full Code Here

TOP

Related Classes of com.dotcms.repackage.org.apache.chemistry.opencmis.commons.impl.dataobjects.ContentStreamImpl

Copyright © 2018 www.massapicom. 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.