/* * Decompiled with CFR 0.152. */ package javax.baja.file; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import javax.baja.file.BAbstractFileStore; import javax.baja.file.BFileSpace; import javax.baja.file.FilePath; import javax.baja.io.ByteBuffer; import javax.baja.sys.BAbsTime; import javax.baja.sys.Sys; import javax.baja.sys.Type; /* * Illegal identifiers - consider using --renameillegalidents true */ public class BMemoryFileStore extends BAbstractFileStore { public static final Type TYPE; BAbsTime lastModified; ByteBuffer buffer; static /* synthetic */ Class class$javax$baja$file$BMemoryFileStore; public boolean isDirectory() { return false; } public boolean isReadonly() { return false; } public long getSize() { return this.buffer.getLength(); } public BAbsTime getLastModified() { return this.lastModified; } public byte[] read() throws IOException { return this.buffer.toByteArray(); } public final InputStream getInputStream() throws IOException { return new ByteArrayInputStream(this.read()); } public final OutputStream getOutputStream() throws IOException { this.lastModified = BAbsTime.make(); this.buffer = new ByteBuffer(); return this.buffer.getOutputStream(); } public boolean equals(Object object) { boolean bl = false; if (this == object) { bl = true; } return bl; } public Type getType() { return TYPE; } static /* synthetic */ Class class(String string, boolean bl) { try { Class clazz = Class.forName(string); if (!bl) { clazz = clazz.getComponentType(); } return clazz; } catch (ClassNotFoundException classNotFoundException) { throw new NoClassDefFoundError(classNotFoundException.getMessage()); } } private final /* synthetic */ void this() { this.buffer = new ByteBuffer(); } public BMemoryFileStore(BFileSpace bFileSpace, FilePath filePath) { super(bFileSpace, filePath); this.this(); } static { Class clazz = class$javax$baja$file$BMemoryFileStore; if (clazz == null) { clazz = class$javax$baja$file$BMemoryFileStore = BMemoryFileStore.class("[Ljavax.baja.file.BMemoryFileStore;", false); } TYPE = Sys.loadType(clazz); } }