Add transparency option on Flat and Surface map, fix file locks

This commit is contained in:
Mike Primm 2011-05-31 23:44:17 -05:00
parent c48d06eec1
commit c4646dc299
5 changed files with 102 additions and 15 deletions

View file

@ -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;
}

View file

@ -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()));