
nl.tweeenveertig.openstack.headers.object.range.LastPartRange Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of joss Show documentation
Show all versions of joss Show documentation
Java Client library for OpenStack Storage (Swift)
package nl.tweeenveertig.openstack.headers.object.range;
/**
* Take the last bytes of the object with a length equal to 'lastBytes'
*/
public class LastPartRange extends AbstractRange {
public LastPartRange(int lastBytes) {
super(-1, lastBytes);
}
@Override
public int getFrom(int byteArrayLength) {
return byteArrayLength - length;
}
@Override
public int getTo(int byteArrayLength) {
return byteArrayLength;
}
}