Change zip to java.util

master
randomnicode 6 years ago
parent 9d33ec255b
commit f2339e0942
  1. 8
      airsonic-main/src/main/java/org/airsonic/player/controller/UploadController.java

@ -32,8 +32,6 @@ import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileItemFactory; import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload; import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.apache.tools.zip.ZipEntry;
import org.apache.tools.zip.ZipFile;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -49,6 +47,8 @@ import java.io.FileOutputStream;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.util.*; import java.util.*;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
/** /**
* Controller which receives uploaded files. * Controller which receives uploaded files.
@ -170,7 +170,7 @@ public class UploadController {
try { try {
Enumeration<?> entries = zipFile.getEntries(); Enumeration<?> entries = zipFile.entries();
while (entries.hasMoreElements()) { while (entries.hasMoreElements()) {
ZipEntry entry = (ZipEntry) entries.nextElement(); ZipEntry entry = (ZipEntry) entries.nextElement();
@ -231,10 +231,12 @@ public class UploadController {
start = System.currentTimeMillis(); start = System.currentTimeMillis();
} }
@Override
public void start(String fileName) { public void start(String fileName) {
status.setFile(new File(fileName)); status.setFile(new File(fileName));
} }
@Override
public void bytesRead(long bytesRead) { public void bytesRead(long bytesRead) {
// Throttle bitrate. // Throttle bitrate.

Loading…
Cancel
Save