Example usage for org.apache.commons.lang.math Range getMaximumLong

List of usage examples for org.apache.commons.lang.math Range getMaximumLong

Introduction

In this page you can find the example usage for org.apache.commons.lang.math Range getMaximumLong.

Prototype

public long getMaximumLong() 

Source Link

Document

Gets the maximum number in this range as a long.

This implementation uses the #getMaximumNumber() method.

Usage

From source file:net.sourceforge.subsonic.io.RangeOutputStream.java

/**
 * Wraps the given output stream in a RangeOutputStream, using the values
 * in the given range, unless the range is <code>null</code> in which case
 * the original OutputStream is returned.
 *
 * @param out   The output stream to wrap in a RangeOutputStream.
 * @param range The range, may be <code>null</code>.
 * @return The possibly wrapped output stream.
 *///from   ww w  .  ja v  a2s .co m
public static OutputStream wrap(OutputStream out, Range range) {
    if (range == null) {
        return out;
    }
    return new RangeOutputStream(out, range.getMinimumLong(), range.getMaximumLong());
}