Class org.as2lib.io.file.SimpleTextFile

Implemented Interfaces

TextFile

Description

SimpleTextFile represents the simplest way for accessing the file informations.

Supports all necessary features for TextFile without any other advantages.

Method Index

new SimpleTextFile()
getContent(), getLocation(), getSize(), toString()

Constructor Detail

SimpleTextFile

public function SimpleTextFile(source:String, size:Byte, uri:String)

Constructs a new SimpleTextFile.

Parameters

sourcecontent of the TextFile to create
sizesize in Byte of the loaded resource
urilocation of the loaded resource

Method Detail

getLocation

public function getLocation(Void):String

Returns the location of the resource corresponding to the content.

Note: Might be the URI of the resource or null if its not requestable or the internal location corresponding to the instance path (if its without any connection to a real file).

Return

location of the resource related to the content

getContent

public function getContent(Void):String

Returns the content of the file

Return

content of the file

Specified By

getContent() in org.as2lib.io.file.TextFile

See Also

getSize

public function getSize(Void):Byte

Returns the size of the file in bytes.

Return

size of the file in bytes

toString

public function toString():String

Extended Stringifier Example: [type org.as2lib.io.file.SimpleTextFile | Location: MyTextFile.txt; Size: 12KB; ]

Return

the TextFile as string

Specified By

toString() in org.as2lib.core.BasicInterface

Overrides

toString() in org.as2lib.core.BasicClass