Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
unused import #102
Browse files Browse the repository at this point in the history
  • Loading branch information
srose authored and ascheman committed Feb 22, 2020
1 parent 60eb85c commit f484151
Showing 1 changed file with 41 additions and 42 deletions.
Original file line number Diff line number Diff line change
@@ -1,42 +1,41 @@
package org.dukecon.server.conference

import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream
import org.springframework.stereotype.Service

/**
* Created by ascheman on 17.06.17.
*/
@Service
interface SpeakerImageService {
static class ImageWithName {
final String filename
final byte[] content

ImageWithName(String filename, byte[] content) {
this.filename = filename
this.content = content
}

void writeToDisk(String path) {
FileOutputStream outputStream
String fileWithPath = path + File.separator + this.filename
try {
outputStream = new FileOutputStream(fileWithPath)
outputStream.write(this.content)
outputStream.flush()
} catch(Exception e) {
throw new RuntimeException("could not write file: $fileWithPath ", e)
} finally {
if(outputStream)
outputStream.close()
}
}
}

Map<String, SpeakerImageService.ImageWithName> getImages()
String addImage(byte[] content)
String addImage(byte[] content, String filename)
String addImage(String contentBase64)
String addImage(String contentBase64, String filename)
ImageWithName getImage(String md5Hash)
}
package org.dukecon.server.conference

import org.springframework.stereotype.Service

/**
* Created by ascheman on 17.06.17.
*/
@Service
interface SpeakerImageService {
static class ImageWithName {
final String filename
final byte[] content

ImageWithName(String filename, byte[] content) {
this.filename = filename
this.content = content
}

void writeToDisk(String path) {
FileOutputStream outputStream
String fileWithPath = path + File.separator + this.filename
try {
outputStream = new FileOutputStream(fileWithPath)
outputStream.write(this.content)
outputStream.flush()
} catch(Exception e) {
throw new RuntimeException("could not write file: $fileWithPath ", e)
} finally {
if(outputStream)
outputStream.close()
}
}
}

Map<String, SpeakerImageService.ImageWithName> getImages()
String addImage(byte[] content)
String addImage(byte[] content, String filename)
String addImage(String contentBase64)
String addImage(String contentBase64, String filename)
ImageWithName getImage(String md5Hash)
}

0 comments on commit f484151

Please sign in to comment.