Hello All,
We are using following code to create file item :
aFile = (IFileItem) IFileItem.ITEM_TYPE.createItem();
aFile.setParent(parentFolder);
aFile.setName(name);
aFile.setContentType(IFileItem.CONTENT_TYPE_UNKNOWN);
but setContentType can have the values :
CONTENT_TYPE_TEXT
CONTENT_TYPE_XML
CONTENT_TYPE_UNKNOWN,
Also, for copying the contents we have :
IFileContentManager contentManager = FileSystemCore.getContentManager(fTeamRepository);
IFileContent storedzipContent = contentManager.storeContent(
IFileContent.ENCODING_UTF_8,
FileLineDelimiter.LINE_DELIMITER_NONE,
new VersionedContentManagerByteArrayInputStreamPovider(
contents.toByteArray()), null, fMonitor);,
new VersionedContentManagerByteArrayInputStreamPovider(
contents.toByteArray()), null, fMonitor);
But few questions remains unanswered for us.. please help :
1. When should we use CONTENT_TYPE_UNKNOWN ? how is it different from CONTENT_TYPE_TEXT ?
2. If we use CONTENT_TYPE_TEXT, it is supporting all the formats we need, including xml, then why do we have CONTENT_TYPE_XML also ? is it something that CONTENT_TYPE_TEXT cant support XML ?
3. Is there any dependency between CONTENT_TYPE_UNKNOWN, ENCODING_UTF_8 and
LINE_DELIMITER_NONE.
Please suggest where can we get more info on this.
Thanks.