[jira] [Comment Edited] (OFBIZ-10188) Add new FileUtil methods for zip management

2018-02-08 Thread Jacques Le Roux (JIRA)

[ 
https://issues.apache.org/jira/browse/OFBIZ-10188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16357045#comment-16357045
 ] 

Jacques Le Roux edited comment on OFBIZ-10188 at 2/8/18 3:10 PM:
-

I have not a strong opinion about it.

I regularly ask people to use EntityUtilProperties instead of simply 
UtilProperties, because EntityUtilProperties ultimately relies on 
UtilProperties. But on the other hand it's sometimes a pain because it's 
incomplete. So you write things like

{{boolean ... = EntityUtilProperties.getPropertyAsBoolean("...", "...", 
false);}}
instead of
{{boolean ... = UtilProperties.getPropertyAsBoolean("...", "...", false);}}
And one day maybe a delegator will miss there. In other words we should 
complete EntityUtilProperties before asking everyone to use it :D
In case or simple properties it's OK though.


was (Author: jacques.le.roux):
I have not a strong opinion about it.

I regularly ask people to use EntityUtilProperties instead of simply 
UtilProperties, because EntityUtilProperties ultimately relies on 
UtilProperties. But on the other hand it's sometimes a pain because it's 
incomplete. So you write things like

{{boolean ... = EntityUtilProperties.getPropertyAsBoolean("...", "...", 
false);}}
instead of
{{boolean ... = yUtilProperties.getPropertyAsBoolean("...", "...", false);}}
And one day maybe a delegator will miss there. In other words we should 
complete EntityUtilProperties before asking everyone to use it :D
In case or simple properties it's OK though.

> Add new FileUtil methods for zip management
> ---
>
> Key: OFBIZ-10188
> URL: https://issues.apache.org/jira/browse/OFBIZ-10188
> Project: OFBiz
>  Issue Type: New Feature
>Reporter: Gil Portenseigne
>Assignee: Gil Portenseigne
>Priority: Minor
> Fix For: Upcoming Branch
>
> Attachments: OFBIZ-10188.patch, OFBIZ_10188.patch
>
>
> Add new FileUtil methods for zip management.
> Add zipFileStream method that will zip FileStream to a zipped one.
> Add unzipFileToFolder method to unzip a given archive to a given Folder



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (OFBIZ-10188) Add new FileUtil methods for zip management

2018-02-02 Thread Gil Portenseigne (JIRA)

[ 
https://issues.apache.org/jira/browse/OFBIZ-10188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16350029#comment-16350029
 ] 

Gil Portenseigne edited comment on OFBIZ-10188 at 2/2/18 9:29 AM:
--

zos.setLevel(9) can be rewritten to 
zos.setLevel(Deflater.{color:#9876aa}BEST_COMPRESSION{color}){color:#cc7832};
That will be clearer :), and the choice was made to optimize the size of data. 
No strong opinion here either.

Ok for the new byte[8192], thanks for the link, i did some search about this 
and agree with you increasing the size of the buffer !



was (Author: gil portenseigne):
zos.setLevel(9) can be rewritten to 
zos.setLevel(Deflater.{color:#9876aa}BEST_COMPRESSION{color}){color:#cc7832};
{color:#33}That will be clearer :), and the choice was made to optimize the 
size of data. No strong opinion here either.{color}{color}

{color:#cc7832}{color:#33}Ok for the new byte[8192], thanks for the link, i 
did some search about this and agree with you increasing the size of the buffer 
!{color}{color}

 

 

{color:#cc7832} {color}

> Add new FileUtil methods for zip management
> ---
>
> Key: OFBIZ-10188
> URL: https://issues.apache.org/jira/browse/OFBIZ-10188
> Project: OFBiz
>  Issue Type: New Feature
>Reporter: Gil Portenseigne
>Assignee: Gil Portenseigne
>Priority: Minor
> Fix For: Upcoming Branch
>
> Attachments: OFBIZ-10188.patch, OFBIZ_10188.patch
>
>
> Add new FileUtil methods for zip management.
> Add zipFileStream method that will zip FileStream to a zipped one.
> Add unzipFileToFolder method to unzip a given archive to a given Folder



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)