Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for FileSizeFormat (0.08 sec)

  1. compat/maven-embedder/src/main/java/org/apache/maven/cli/transfer/FileSizeFormat.java

     * @see <a
     *      href="https://en.wikipedia.org/wiki/Octet_%28computing%29">https://en.wikipedia.org/wiki/Octet_(computing)</a>
     */
    public class FileSizeFormat {
        public enum ScaleUnit {
            BYTE {
                @Override
                public long bytes() {
                    return 1L;
                }
    
                @Override
                public String symbol() {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  2. compat/maven-embedder/src/test/java/org/apache/maven/cli/transfer/FileSizeFormatTest.java

        void testNegativeProgressedSize() {
            FileSizeFormat format = new FileSizeFormat();
    
            long negativeProgressedSize = -100L;
            assertThrows(IllegalArgumentException.class, () -> format.formatProgress(negativeProgressedSize, 10L));
        }
    
        @Test
        void testNegativeProgressedSizeBiggerThanSize() {
            FileSizeFormat format = new FileSizeFormat();
    
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 13K bytes
    - Viewed (0)
  3. compat/maven-embedder/src/main/java/org/apache/maven/cli/transfer/AbstractMavenTransferListener.java

            TransferResource resource = event.getResource();
            long contentLength = event.getTransferredBytes();
            FileSizeFormat format = new FileSizeFormat();
    
            MessageBuilder message = messageBuilderFactory.builder();
            message.append(action).style(STYLE).append(' ').append(direction).append(' ');
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  4. compat/maven-embedder/src/main/java/org/apache/maven/cli/transfer/Slf4jMavenTransferListener.java

            TransferResource resource = event.getResource();
            long contentLength = event.getTransferredBytes();
            FileSizeFormat format = new FileSizeFormat();
    
            StringBuilder message = new StringBuilder();
            message.append(action).append(' ').append(direction).append(' ').append(resource.getRepositoryId());
            message.append(": ");
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  5. compat/maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java

    public class ConsoleMavenTransferListener extends AbstractMavenTransferListener {
    
        private final Map<TransferResourceIdentifier, TransferResourceAndSize> transfers = new LinkedHashMap<>();
        private final FileSizeFormat format = new FileSizeFormat(); // use in a synchronized fashion
        private final StringBuilder buffer = new StringBuilder(128); // use in a synchronized fashion
    
        private final boolean printResourceNames;
        private int lastLength;
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 5.4K bytes
    - Viewed (0)
Back to top