-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc802b0
commit d22785e
Showing
5 changed files
with
87 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.structurizr.lite.util; | ||
|
||
import java.io.File; | ||
import java.io.FileInputStream; | ||
import java.io.InputStream; | ||
import java.net.URLConnection; | ||
|
||
public final class Image { | ||
|
||
private final File file; | ||
|
||
public Image(File file) { | ||
this.file = file; | ||
} | ||
|
||
public InputStream getInputStream() throws Exception { | ||
return new FileInputStream(file); | ||
} | ||
|
||
public long getContentLength() { | ||
return file.length(); | ||
} | ||
|
||
public String getContentType() { | ||
return URLConnection.guessContentTypeFromName(file.getName()); | ||
} | ||
|
||
} |
23 changes: 0 additions & 23 deletions
23
src/main/java/com/structurizr/lite/util/InputStreamAndContentLength.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters