fdalsotto commented on a change in pull request #4878: URL: https://github.com/apache/cloudstack/pull/4878#discussion_r611491473
########## File path: utils/src/main/java/org/apache/cloudstack/utils/bytescale/ByteScaleUtils.java ########## @@ -0,0 +1,49 @@ +/* + * Copyright 2021 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.cloudstack.utils.bytescale; + +/** + * This class provides a facility to convert bytes through his scales (b, Kib, Kb, Mib, Mb...). + * + */ +public class ByteScaleUtils { + + public static final int KiB = 1024; Review comment: getting myself more familiar with this code base so apologies if the comment isn't good: could we use org.apache.commons.io.FileUtils instead of hardcoding 1024 in multiple places in the class? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
