1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-08-13 17:03:45 -04:00
filebot/source/net/sourceforge/filebot/ui/panel/subtitle/MemoryFile.java

43 lines
576 B
Java
Raw Normal View History

package net.sourceforge.filebot.ui.panel.subtitle;
import java.nio.ByteBuffer;
class MemoryFile {
private final String path;
private final ByteBuffer data;
public MemoryFile(String path, ByteBuffer data) {
// normalize folder separator
this.path = path.replace('\\', '/');
this.data = data;
}
public String getName() {
return path.substring(path.lastIndexOf("/") + 1);
}
public String getPath() {
return path;
}
public ByteBuffer getData() {
return data.duplicate();
}
@Override
public String toString() {
return path;
}
}