public interface Media
HDD
, JAR
... It could point to a file or a directory.
Example:
Engine.start("First Code", Version.create(1, 0, 0), Verbose.CRITICAL, "resources"); Medias.create("img", "image.png"); print(com.b3dgs.lionengine.core.Medias.create()); // print: resources/img/image.png
Medias
Modifier and Type | Method and Description |
---|---|
boolean |
exists()
Check if the following media point to an existing target (could be file of directory).
|
File |
getFile()
Get the file descriptor.
|
InputStream |
getInputStream()
Get the media input stream.
|
OutputStream |
getOutputStream()
Get the media output stream.
|
String |
getParentPath()
Get the media parent path.
|
String |
getPath()
Get the media path.
|
String getPath()
String getParentPath()
File getFile()
LionEngineException
- If descriptor is not accessible.InputStream getInputStream()
LionEngineException
- If error when getting the stream.OutputStream getOutputStream()
LionEngineException
- If error when getting the stream.boolean exists()
true
if media is an existing file or directory, false
else.Copyright © 2016 Byron 3D Games Studio. All rights reserved.