mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged from BRANCHES/DEV/KEVINR:
. NodeInfo panel and Ajax client library - Rewrite of Node Info panel - Alfresco common DOM methods refactored into namespaced object (YUI/Dojo style) Alfresco.Dom - Addition of useful DOM and 'smart' alignment method to common.js - OpenSearch now uses additional namespace for it's global method handlers: Alfresco.OpenSearchEngine - Temporary icons added for pop-up node info panel . Additional FreeMarker model API method "cropContent(contentprop, length)" to return the first N bytes of a content stream - auto converted to plain/text from all supported transformation mimetypes . DownloadContentServlet now handles ContentIOException more gracefully . AbstractContentReader fixed to handle empty file data when requesting N characters from a content stream . Yahoo scripts move to PageTag rendering as appropriate . Refactoring of existing ajax components that output Yahoo scripts git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5253 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -400,10 +400,9 @@ public abstract class AbstractContentReader extends AbstractContentAccessor impl
|
||||
}
|
||||
// read it all, if possible
|
||||
int count = reader.read(buffer, 0, length);
|
||||
// there may have been fewer characters - create a new string
|
||||
String result = new String(buffer, 0, count);
|
||||
// done
|
||||
return result;
|
||||
|
||||
// there may have been fewer characters - create a new string as the result
|
||||
return (count != -1 ? new String(buffer, 0, count) : "");
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
|
Reference in New Issue
Block a user