Add transparency option on Flat and Surface map, fix file locks
This commit is contained in:
parent
c48d06eec1
commit
c4646dc299
5 changed files with 102 additions and 15 deletions
|
|
@ -113,15 +113,17 @@ public abstract class FileHandler implements HttpHandler {
|
|||
out.write(readBuffer, 0, readBytes);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
fileInput.close();
|
||||
throw e;
|
||||
} finally {
|
||||
freeReadBuffer(readBuffer);
|
||||
if(fileInput != null) {
|
||||
closeFileInput(path, fileInput);
|
||||
fileInput = null;
|
||||
}
|
||||
}
|
||||
closeFileInput(path, fileInput);
|
||||
} catch (Exception e) {
|
||||
if (fileInput != null) {
|
||||
try { fileInput.close(); } catch (IOException ex) { }
|
||||
try { closeFileInput(path, fileInput); fileInput = null; } catch (IOException ex) { }
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ public class FilesystemHandler extends FileHandler {
|
|||
try {
|
||||
result = new FileInputStream(file);
|
||||
} catch (FileNotFoundException e) {
|
||||
FileLockManager.releaseReadLock(file);
|
||||
return null;
|
||||
}
|
||||
response.fields.put(HttpField.ContentLength, Long.toString(file.length()));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue