MemoryFileSystem

Inheritance: java.lang.Object, com.aspose.threed.FileSystem

public class MemoryFileSystem extends FileSystem

MemoryFileSystem 은 읽기/쓰기 작업을 메모리로 매핑합니다. Example: 다음 코드는 파일을 메모리로 내보내는 방법을 보여주며, MemoryFileSystem을 사용하여 종속 파일을 포함합니다.

//create a scene with material
     Scene scene = new Scene();
     scene.getRootNode().createChildNode(new Box()).setMaterial(new LambertMaterial());
     //create a save option and specify the file system, so the dependent file will be written to memory
     var opt = FileFormat.WAVEFRONTOBJ.createSaveOptions();
     var mfs = new MemoryFileSystem();
     opt.setFileSystem(mfs);
     //obj's material file name is associated with the obj's file name, so we need a explicit name.
     opt.setFileName("test.obj");
     try (var ms = new MemoryStream())
     {
         scene.save(ms, opt);
     }
     //the test.obj was written to variable ms, and we can also get the test.mtl file content by
     var materialFile = mfs.getFileContent("test.mtl");

생성자

생성자설명
MemoryFileSystem()

메서드

메서드설명
close()파일 시스템을 해제하고 리소스를 해제합니다.
equals(Object arg0)
getClass()
getFileContent(String fileName)지정된 파일의 원시 내용을 반환합니다.
getFileNames()이 메모리 파일 시스템에 있는 파일 이름들.
hashCode()
notify()
notifyAll()
readFile(String fileName, IOConfig options)종속성을 읽기 위한 스트림을 생성합니다.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)
writeFile(String fileName, IOConfig options)종속성을 쓰기 위한 스트림을 생성합니다.

MemoryFileSystem()

public MemoryFileSystem()

close()

public void close()

파일 시스템을 해제하고 리소스를 해제합니다.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

매개변수형식설명
arg0java.lang.Object

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getFileContent(String fileName)

public byte[] getFileContent(String fileName)

지정된 파일의 원시 내용을 반환합니다. 지정된 파일이 존재하지 않을 경우 java.io.FileNotFoundException을 발생시킵니다.

Parameters:

매개변수형식설명
fileNamejava.lang.String

Returns: byte[]

getFileNames()

public List<String> getFileNames()

이 메모리 파일 시스템에 있는 파일 이름들.

Returns: java.util.List<java.lang.String>

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

readFile(String fileName, IOConfig options)

public Stream readFile(String fileName, IOConfig options)

종속성을 읽기 위한 스트림을 생성합니다.

Parameters:

매개변수형식설명
fileNamejava.lang.String
optionsIOConfig

Returns: com.aspose.csporter.helpers.Stream

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final void wait(long arg0)

Parameters:

매개변수형식설명
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

매개변수형식설명
arg0long
arg1int

writeFile(String fileName, IOConfig options)

public Stream writeFile(String fileName, IOConfig options)

종속성을 쓰기 위한 스트림을 생성합니다.

Parameters:

매개변수형식설명
fileNamejava.lang.String
optionsIOConfig

Returns: com.aspose.csporter.helpers.Stream