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

43 lines
557 B
Java
Raw Normal View History

2014-04-19 02:30:29 -04:00
package net.filebot.vfs;
import java.nio.ByteBuffer;
public 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;
}
}