io.milton.servlet.upload.UploadInfo Maven / Gradle / Ivy
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
/* Licence:
* Use this however/wherever you like, just don't blame me if it breaks anything.
*
* Credit:
* If you're nice, you'll leave this bit:
*
* Class by Pierre-Alexandre Losson -- http://www.telio.be/blog
* email : [email protected]
*/
package io.milton.servlet.upload;
public class UploadInfo
{
private long totalSize = 0;
private long bytesRead = 0;
private long elapsedTime = 0;
private String status = "done";
private int fileIndex = 0;
public UploadInfo()
{
}
public UploadInfo(int fileIndex, long totalSize, long bytesRead, long elapsedTime, String status)
{
this.fileIndex = fileIndex;
this.totalSize = totalSize;
this.bytesRead = bytesRead;
this.elapsedTime = elapsedTime;
this.status = status;
}
public String getStatus()
{
return status;
}
public void setStatus(String status)
{
this.status = status;
}
public long getTotalSize()
{
return totalSize;
}
public void setTotalSize(long totalSize)
{
this.totalSize = totalSize;
}
public long getBytesRead()
{
return bytesRead;
}
public void setBytesRead(long bytesRead)
{
this.bytesRead = bytesRead;
}
public long getElapsedTime()
{
return elapsedTime;
}
public void setElapsedTime(long elapsedTime)
{
this.elapsedTime = elapsedTime;
}
public boolean isInProgress()
{
return "progress".equals(status) || "start".equals(status);
}
public int getFileIndex()
{
return fileIndex;
}
public void setFileIndex(int fileIndex)
{
this.fileIndex = fileIndex;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy