This commit is contained in:
Victor 2018-11-14 19:08:50 +02:00
commit 2ca6e75aac
599 changed files with 109934 additions and 0 deletions

91
build.xml Normal file
View File

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<project name="UniFM" default="jar" basedir=".">
<description>Builds, tests, and runs the project .</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
pre-init: called before initialization of project properties
post-init: called after initialization of project properties
pre-preprocess: called before text preprocessing of sources
post-preprocess: called after text preprocessing of sources
pre-compile: called before source compilation
post-compile: called after source compilation
pre-obfuscate: called before obfuscation
post-obfuscate: called after obfuscation
pre-preverify: called before preverification
post-preverify: called after preverification
pre-jar: called before jar building
post-jar: called after jar building
pre-build: called before final distribution building
post-build: called after final distribution building
pre-clean: called before cleaning build products
post-clean: called after cleaning build products
Example of pluging a my-special-task after the compilation could look like
<target name="post-compile">
<my-special-task>
<fileset dir="${build.classes.dir}"/>
</my-special-task>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Other way how to customize the build is by overriding existing main targets.
The target of interest are:
preprocess: preprocessing
extract-libs: extraction of libraries and resources
compile: compilation
create-jad: construction of jad and jar manifest source
obfuscate: obfuscation
preverify: preverification
jar: jar archive building
run: execution
debug: execution in debug mode
build: building of the final distribution
javadoc: javadoc generation
Example of overriding the target for project execution could look like
<target name="run" depends="init,jar">
<my-special-exec jadfile="${dist.dir}/${dist.jad}"/>
</target>
Be careful about correct dependencies when overriding original target.
Again, for list of available properties which you can use check the target
you are overriding in nbproject/build-impl.xml file.
A special target for-all-configs can be used to run some specific targets for
all project configurations in a sequence. File nbproject/build-impl.xml
already contains some "for-all" targets:
jar-all
javadoc-all
clean-all
Example of definition of target iterating over all project configurations:
<target name="jar-all">
<property name="target.to.call" value="jar"/>
<antcall target="for-all-configs"/>
</target>
-->
<target name="pre-jar"> <!--name="increment-app-version" if="app-version.autoincrement.trigger">-->
<propertyfile file="nbproject/private/private.properties">
<entry key="deployment.counter" type="int" operation="+" default="2" pattern="0"/>
<entry key="deployment.number" value="${deployment.counter}"/>
</propertyfile>
</target>
<target name="increment-app-version" if="app-version.autoincrement.trigger">
</target>
</project>

1430
nbproject/build-impl.xml Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
build.xml.data.CRC32=cc72bae4
build.xml.script.CRC32=f1a8f107
build.xml.stylesheet.CRC32=03eab09b
nbproject/build-impl.xml.data.CRC32=cc72bae4
nbproject/build-impl.xml.script.CRC32=b89822d1
nbproject/build-impl.xml.stylesheet.CRC32=7a0aeb65

View File

@ -0,0 +1,9 @@
#Tue, 14 Sep 2010 19:03:15 +0300
app-version.autoincrement=true
config.active=ReleaseFull
deployment.counter=1398
deployment.number=1397
file.reference.motorola_jsr.jar=E\:\\MOBILE\\Programming\\Java\\Libraries_n_API\\API\\motorola_jsr.jar
file.reference.SiemensAPI.zip=E\:\\MOBILE\\Programming\\Java\\Libraries_n_API\\API\\SiemensAPI.zip
javadoc.preview=true
netbeans.user=C:\\Users\\aNNiMON\\.netbeans\\7.0beta2

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
</project-private>

View File

@ -0,0 +1,152 @@
abilities=MMAPI=1.1,SATSAJCRMI=1.0,SATSACRYPTO=1.0,JSR82=1.1,NOKIAUI=1.0,JSR226=1.0,MIDP=2.1,capuchin=1.0,JSR229=1.1.0,SATSAAPDU=1.0,CLDC=1.1,JSR177=1.0,JSR179=1.0.1,eSWT=1.1,J2MEWS=1.0,VSCL=2.1,WMA=2.0,JSR172=1.0,JSR256=true,SEMC_EXT_JP8=1.0,ColorScreen,NokiaUI=true,OBEX=1.0,JSR238=1.0,JSR239=1.0,JSR211=1.0,JSR234=1.0,MascotV3=1.0,ScreenWidth=240,IAPInfo=1.0,JSR75=auto,JSR184=1.1,SATSAPKI=1.0,ScreenHeight=321,ScreenColorDepth=8,JSR180=1.0.1,J2MEXMLRPC=1.0
all.configurations=\ ,ReleaseFull,ReleaseLite
application.args=
application.description=
application.description.detail=
application.name=
application.vendor=Vendor
build.classes.dir=${build.dir}/compiled
build.classes.excludes=**/*.java,**/*.form,**/*.class,**/.nbintdb,**/*.mvd,**/*.wsclient,**/*.vmd
build.dir=build/${config.active}
build.root.dir=build
configs.ReleaseFull.filter.exclude.tests=false
configs.ReleaseFull.filter.excludes=
configs.ReleaseFull.filter.more.excludes=**/overview.html,**/package.html,**/Thumbs.db
configs.ReleaseFull.filter.use.standard=true
configs.ReleaseFull.obfuscation.custom=-dontusemixedcaseclassnames\n-overloadaggressively\n-optimizations !class/merging/*\n-keep public class * extends javax.microedition.midlet.MIDlet\n-keep public class AccelImpl\n-keep class mcp.*\n-adaptresourcefilecontents config/**,lang/**\n-adaptclassstrings\n-keep,allowobfuscation,allowoptimization class * extends com.one.Container\n-keep class * implements com.one.Application\n-keep class * implements com.one.FileSource\n-keep class * implements com.one.OptionStorage\n-dontpreverify\n-applymapping C:\\Users\\aNNiMON\\Documents\\NetBeansProjects\\UniFM\\proguard.map\n-printmapping C:\\Users\\aNNiMON\\Documents\\NetBeansProjects\\UniFM\\proguard.map
configs.ReleaseFull.obfuscation.level=1
configs.ReleaseLite.obfuscation.custom=-dontusemixedcaseclassnames\n-overloadaggressively\n-optimizations !class/merging/*\n-keep public class * extends javax.microedition.midlet.MIDlet\n-keep public class AccelImpl\n-keep class mcp.*\n-adaptresourcefilecontents\n-adaptclassstrings\n-keep,allowobfuscation,allowoptimization class com.one.Container\n-keep,allowobfuscation,allowoptimization class com.one.Application\n-keep,allowobfuscation,allowoptimization class com.one.FileSource\n-keep,allowobfuscation,allowoptimization class com.one.OptionStorage\n-keep,allowobfuscation,allowoptimization class com.classpath.zip.ZipFile\n-keep,allowobfuscation,allowoptimization class com.one.PlainPackage\n-keep class modules.color.*\n-keep class modules.text.TextModule\n-keep class modules.text.TextFileSource\n-keep class modules.text.TextOptions\n-dontpreverify\n-applymapping C:\\UniFM\\proguard.map\n-printmapping C:\\UniFM\\proguard.map\n
configs.ReleaseLite.obfuscation.level=1
debug.level=debug
debugger.timeout=
deployment.copy.target=deploy
deployment.instance=default
deployment.jarurl=${dist.jar}
deployment.method=NONE
deployment.override.jarurl=false
dist.dir=dist/${config.active}
dist.jad=UniFM.jad
dist.jar=UniFM.jar
dist.javadoc.dir=${dist.dir}/doc
dist.root.dir=dist
extra.classpath=${file.reference.SiemensAPI.zip};${file.reference.motorola_jsr.jar}
file.reference.builtin.ks=${netbeans.user}/config/j2me/builtin.ks
file.reference.UniFM-res=res
filter.exclude.tests=false
filter.excludes=
filter.more.excludes=**/overview.html,**/package.html,**/Thumbs.db
filter.use.standard=true
jar.compress=true
javac.debug=true
javac.deprecation=false
javac.encoding=UTF-8
javac.optimize=false
javac.source=1.3
javac.target=1.3
javadoc.author=false
javadoc.encoding=
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
libs.classpath=${file.reference.SiemensAPI.zip};${file.reference.motorola_jsr.jar};${file.reference.UniFM-res}
main.class=
main.class.class=applet
manifest.apipermissions=
manifest.file=manifest.mf
manifest.is.liblet=false
manifest.jad=
manifest.manifest=
manifest.midlets=MIDlet-4: Test canvas,,Test\nMIDlet-3: Reset RMS,,ResetRMS\nMIDlet-2: Legacy version,/img/icon.png,Browser\nMIDlet-1: Full version,/img/icon.png,UniFM\n
manifest.others=MIDlet-Vendor: SilentKnight, VMX, DiHLoS\nPointer-Translate-Y: 0\nDeployment-Number: ${deployment.number}\nPointer-Translate-X: 0\nMIDlet-Name: UniFM\nPointer-Soft-Width: 2.0\nMIDlet-Icon: /img/icon.png\nPointer-Cell-Height: 1.0\nPointer-Cell-Width: 2.0\nMIDlet-Version: 1.2\nDefault-Encoding: cp1251\nArchive-Encoding: cp866\nID3-Encoding: cp1252\n
manifest.pushregistry=
name=UniFM
no.dependencies=false
nokiaS80.application.icon=
nsicom.application.monitorhost=
nsicom.application.runremote=
nsicom.application.runverbose=
nsicom.remoteapp.location=\\My Documents\\NetBeans Applications
nsicom.remotevm.location=\\Windows\\creme\\bin\\CrEme.exe
obfuscated.classes.dir=${build.dir}/obfuscated
obfuscation.custom=
obfuscation.level=0
obfuscator.destjar=${build.dir}/obfuscated.jar
obfuscator.srcjar=${build.dir}/before-obfuscation.jar
platform.active=Sony_Ericsson_SDK_2_5_0_6_for_the_Java_TM__ME_Platform_Emulator_
platform.active.description=Sony Ericsson SDK 2.5.0.6 for the Java(TM) ME Platform(Emulator)
platform.apis=JSR234-1.0,SATSA-APDU-1.0,capuchin-1.0,J2ME-WS-1.0,J2ME-XMLRPC-1.0,SATSA-JCRMI-1.0,SATSA-CRYPTO-1.0,JSR239-1.0,MascotV3-1.0,JSR238-1.0,MMAPI-1.1,JSR256-1.1,NokiaUI-1.0,IAPInfo-1.0,JSR229-1.1.0,SATSA-PKI-1.0,JSR180-1.0.1,JSR226-1.0,SEMC_EXT_JP8-1.0,VSCL-2.0,VSCL-2.1,eSWT-1.1,JSR75-1.0,JSR184-1.1,WMA-2.0,JSR211-1.0,JSR82-1.1,JSR177-1.0,JSR179-1.0.1
platform.bootclasspath=${platform.home}/lib/eswt.jar:${platform.home}/lib/mascotv3.jar:${platform.home}/lib/jsr226.jar:${platform.home}/lib/jsr256.jar:${platform.home}/lib/satsa-crypto.jar:${platform.home}/lib/jsr229.jar:${platform.home}/lib/jsr238.jar:${platform.home}/lib/j2me-xmlrpc.jar:${platform.home}/lib/jsr211.jar:${platform.home}/lib/vscl21.jar:${platform.home}/lib/satsa-jcrmi.jar:${platform.home}/lib/jsr082.jar:${platform.home}/lib/satsa-apdu.jar:${platform.home}/lib/jsr184.jar:${platform.home}/lib/nokiaext.jar:${platform.home}/lib/capuchin.jar:${platform.home}/lib/jsr239.jar:${platform.home}/lib/jsr75.jar:${platform.home}/lib/satsa-pki.jar:${platform.home}/lib/jsr179.jar:${platform.home}/lib/jsr180.jar:${platform.home}/lib/iapinfo.jar:${platform.home}/lib/vscl.jar:${platform.home}/lib/mmapi.jar:${platform.home}/lib/j2me-ws.jar:${platform.home}/lib/wma20.jar:${platform.home}/lib/jsr234.jar:${platform.home}/lib/semc_ext_jp8.jar:${platform.home}/lib/cldcapi11.jar:${platform.home}/lib/midpapi20.jar
platform.configuration=CLDC-1.1
platform.device=SonyEricsson_JP8_240x320_Emu
platform.fat.jar=true
platform.profile=MIDP-2.0
platform.trigger=CLDC
platform.type=UEI-1.0.1
preprocessed.dir=${build.dir}/preprocessed
preverify.classes.dir=${build.dir}/preverified
preverify.sources.dir=${build.dir}/preverifysrc
resources.dir=resources
ricoh.application.email=
ricoh.application.fax=
ricoh.application.icon=
ricoh.application.target-jar=
ricoh.application.telephone=
ricoh.application.uid=25863700
ricoh.application.version=
ricoh.dalp.application-desc.auto-run=false
ricoh.dalp.application-desc.energy-save=
ricoh.dalp.application-desc.exec-auth=
ricoh.dalp.application-desc.visible=true
ricoh.dalp.argument=
ricoh.dalp.codebase=
ricoh.dalp.display-mode.color=true
ricoh.dalp.display-mode.is-4line-support=false
ricoh.dalp.display-mode.is-hvga-support=true
ricoh.dalp.display-mode.is-vga-support=false
ricoh.dalp.display-mode.is-wvga-support=false
ricoh.dalp.information.abbreviation=
ricoh.dalp.information.icon.basepath=
ricoh.dalp.information.icon.location=
ricoh.dalp.information.is-icon-used=true
ricoh.dalp.install.destination=hdd
ricoh.dalp.install.mode.auto=true
ricoh.dalp.install.work-dir=hdd
ricoh.dalp.is-managed=true
ricoh.dalp.resources.dsdk.version=2.0
ricoh.dalp.resources.jar.basepath=
ricoh.dalp.resources.jar.version=
ricoh.dalp.version=
ricoh.icon.invert=false
ricoh.platform.target.version=
run.cmd.options=
run.jvmargs=
run.method=STANDARD
run.security.domain=manufacturer
run.use.security.domain=false
savaje.application.icon=
savaje.application.icon.focused=
savaje.application.icon.small=
savaje.application.uid=TBD
savaje.bundle.base=
savaje.bundle.debug=false
savaje.bundle.debug.port=
semc.application.caps=
semc.application.icon=
semc.application.icon.count=
semc.application.icon.splash=
semc.application.icon.splash.installonly=false
semc.application.uid=E7786584
semc.certificate.path=
semc.private.key.password=
semc.private.key.path=
sign.alias=minimal
sign.enabled=false
sign.keystore=${file.reference.builtin.ks}
src.dir=src
use.emptyapis=true
use.preprocessor=true

10
nbproject/project.xml Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.kjava.j2meproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2me-project">
<name>UniFM</name>
<minimum-ant-version>1.6</minimum-ant-version>
</data>
</configuration>
</project>

View File

@ -0,0 +1,55 @@
; This file describes modules in general.
; Sections, like [Container] or [Application], define type of a module. Containers are used to transparently open various archives and packages of files, Applications are used to display file contents to the user and to edit those contents.
; FileSources are used to create new files. ContainerSources are technically similar to FileSources, but are used to create containers rather than simple files and are stored in separate internal list.
; Each record in this file has the following syntax:
; module.package.ModuleClass = <explicit_name | #localized_string_identifier> [, icon_file.ext [@ x, y, width, height]]
; If you plan to obfuscate your module, don't forget to tell your obfuscator to adapt the contents of this file.
; For ProGuard it is done like that: -adaptresourcefilecontents config/*
[Container]
a.e.c.k = # 211, icons.png @ 80, 0, 16, 16
a.a.a.b = # 325, icons.png @ 80, 0, 16, 16
a.b.ad = # 212, icons.png @ 80, 0, 16, 16
[Application]
;modules.PlatformRequestModule = # 317, icons.png @ 0, 0, 16, 16
modules.audio.AudioModule = # 213, icons.png @ 16, 0, 16, 16
modules.image.ImageModule = # 214, icons.png @ 32, 0, 16, 16
modules.video.VideoModule = # 215, icons.png @ 48, 0, 16, 16
modules.text.TextModule = # 216, icons.png @ 64, 0, 16, 16
modules.TMOModule = # 217, icons.png @ 96, 0, 16, 16
modules.audio.TrackerModule = # 218, icons.png @ 16, 0, 16, 16
modules.color.ColorModule = # 219, icons.png @ 32, 0, 16, 16
modules.image.VectorModule = # 220, icons.png @ 32, 0, 16, 16
modules.mascot.MascotViewer = # 0, icons.png @ 32, 0, 16, 16
modules.mascot.AnimationViewer = # 1, icons.png @ 48, 0, 16, 16
modules.mascot.TextureLoader = # 2, icons.png @ 32, 0, 16, 16
modules.id3Editor = # 113, icons.png @ 16, 0, 16, 16
modules.playlist.M3UModule = # 281, icons.png @ 16, 0, 16, 16
modules.FileSplitter = # 1, icons.png @ 0, 0, 16, 16
modules.FishlabsUncoder = # 0, icons.png @ 0, 0, 16, 16
modules.langpack.StringUnpacker = # 0, icons.png @ 400, 0, 16, 16
modules.langpack.StringPacker = # 1, icons.png @ 528, 0, 16, 16
;modules.DummyModule = Dummy module, icons.png @ 0, 0, 16, 16
[FileSource]
modules.text.TextFileSource = # 235, icons.png @ 64, 0, 16, 16
modules.NullFileSource = # 282, icons.png @ 0, 0, 16, 16
modules.FileSplicer = # 0, icons.png @ 0, 0, 16, 16
modules.playlist.M3UFileSource = # 204, icons.png @ 16, 0, 16, 16
modules.color.ColorFileSource = # 152, icons.png @ 32, 0, 16, 16
[ContainerSource]
modules.ZipFileSource = # 287, icons.png @ 80, 0, 16, 16
modules.PPKFileSource = # 288, icons.png @ 80, 0, 16, 16
;[Operation]
;test.TestModule = TestName, icons.png

View File

@ -0,0 +1,17 @@
; class.package.ClassName = <offset_value>
; If you plan to obfuscate your module, don't forget to tell your obfuscator to adapt the contents of this file.
; For ProGuard it is done like that: -adaptresourcefilecontents lang/**
modules.langpack.StringUnpacker = 1000
modules.langpack.StringPacker = 1000
modules.FileSplicer = 2000
modules.FileSplitter = 2000
modules.mascot.MascotViewer = 3000
modules.mascot.AnimationViewer = 3000
modules.mascot.TextureLoader = 3000
modules.mascot.a = 3000
modules.FishlabsUncoder = 3500

View File

@ -0,0 +1,362 @@
0 = Select disk:
1 = Favourites
2 = Options
3 = Exit
4 = Disk
5 = Disk information
6 = Total size:
7 = Kb
8 = bytes
9 = Available:
10 = Select
11 = Delete
12 = Delete all
13 = Back
14 = File name must not contain any of the following characters: %A
15 = Confirmation
16 = Delete entry from Favourites?
17 = Delete all entries from Favourites?
18 = Yes
19 = No
20 = Save
21 = Clear
22 = Error!
23 = File %A already exist!
24 = File %A not copied: %B\n\n
25 = File %A not moved: %B\n\n
26 = This file format is not supported!
27 = Open
28 = Paste
29 = Properties
30 = Rename
31 = Copy
32 = Move
33 = Folder...
34 = File...
35 = Add to Favourites
36 = Disk info
37 = Escaped strings
38 = Preferences
39 = Help
40 = OK
41 = Cancel
42 = Added to Clipboard
43 = Information:
44 = Folder name:
45 = File name:
46 = Size:
47 = Attributes:
48 = Last modified:
49 = Rename
50 = Name:
51 = File(folder) with this name already exist! Select another name.
52 = File %A is read only!
53 = Not renamed!
54 = Show hidden files and folders
55 = Visual effects
56 = Browse options:
57 = Extended menu
58 = Rotate by %A°
59 = Show error messages
60 = Create folder
61 = Create file
62 = Folder not created!
63 = Please wait...
64 = Wait
65 = In current folder
66 = On current disk
67 = On all disks
68 = scaled
69 = Attention!
70 = File %A copied. Source file is read-only.\n\n
71 = Delete selected file (folder)?
72 = Delete marked files?
73 = Folder deleted!
74 = Folder not empty. Delete recursively?
75 = File deleted.
76 = File %A not deleted!
77 = License agreement
78 = File type:
79 = File not saved! Exit?
80 = File saved
81 = Clipboard
82 = %A - copy
83 = %A - copy (%B)
84 = Operation complete successfully.
85 = File
86 = File not saved! Check 'Read Only' attribute.
87 = Gb
88 = Mark
89 = Mark all
90 = Unmark all
91 = Open not supported files as text
92 = Sort list
93 = Screen rotation
94 = Restart will be required for the new settings to take effect.
95 = Extract...
96 = Extract all...
97 = Extract to:
98 = Folder does not exist and cannot be created!
99 = Files extracted successfully.
100 = Yes for all
101 = No for all
102 = Vibration on key press, ms
103 = Compressed:
104 = File
105 = Archive
106 = Properties
107 = Operations
108 = Create
109 = Interface
110 = Minimize visual effects
111 = Archive...
112 = Compression level
113 = ID3v1 editor
114 = Title
115 = Artist
116 = Album
117 = Year
118 = Comment
119 = Track no
120 = Genre
121 = Mb
122 = Joy Left
123 = Joy Right
124 = Joy Up
125 = Joy Down
126 = Left softkey
127 = Right softkey
128 = Joy press
129 = Dial
130 = NoDial
131 = Prev screen
132 = Next screen
133 = Prev file
134 = Next file
135 = Hot keys
136 = Additional
137 = Panels
138 = Panel 1
139 = Panel 2
140 = Panel 3
141 = Panel 4
142 = Panel 5
143 = Panel 6
144 = Panel 7
145 = Panel 8
146 = Panel 9
147 = Panel 10
148 = Fullscreen
149 = no action
150 = Keyboard...
151 = Language
152 = Color scheme
153 = Check file attributes
154 = Accurate directory check
155 = Sort file list
156 = Read only
157 = Hidden
158 = Contents
159 = %A folders, %B files
160 = Player options
161 = ID3 encoding
162 = Show play progress
163 = Tracker module buffer size, sec.
164 = Done
165 = Text editor options
166 = Show CR symbol
167 = Show LF symbol
168 = Substitute tabulation with spaces
169 = Go to
170 = Scroll by pages instead of lines
171 = Key mapping
172 = Initial setup
173 = Clock mode
174 = Switch
175 = Next panel
176 = Prev. panel
177 = Next free
178 = Prev. free
179 = Swap panels
180 = Edit
181 = Search
182 = Font
183 = Encoding
184 = Recursive search
185 = Hash-sum
186 = Crypt
187 = Password
188 = Use crypt operation again with the same password for decryption.
189 = Small
190 = Medium
191 = Large
192 = Face
193 = Style
194 = Bold
195 = Italic
196 = Monospace
197 = Proportional
198 = System
199 = Underlined
200 = Show menu numbers
201 = Shuffle playback
202 = Transcode
203 = Custom
204 = Playlist
205 = Search inside archives
206 = Audio
207 = Video
208 = Save path
209 = Absolute
210 = Relative
211 = ZIP archiver
212 = PPK archiver
213 = Audioplayer
214 = Image viewer
215 = Videoplayer
216 = Text editor
217 = Note editor
218 = Tracker player
219 = Color scheme installer
220 = Vector image viewer
221 = Frame cursor
222 = No change
223 = Set
224 = Reset
225 = Background image
226 = Name template
227 = Minimize
228 = Save changes?
229 = Save as...
230 = Edit
231 = Undo
232 = Redo
233 = Find
234 = Find next
235 = Text
236 = Archive encoding
237 = Line number
238 = Remember explored paths
239 = Templates
240 = Use UTF BOM signature
241 = File end is reached. Continue search from the beginning?
242 = To start
243 = To end
244 = Add
245 = Play message signals
246 = Swap soft keys in menus
247 = Ignore case
248 = Don't sort
249 = By name
250 = By type
251 = By date
252 = By size
253 = Sort options
254 = Reverse order
255 = Restart
256 = Move cursor on mark
257 = Replace
258 = Replace all
259 = Replace with
260 = Alter clock position
261 = matches
262 = Equalizer
263 = Hz
264 = KHz
265 = dB
266 = Use accelerometer
267 = Backlight always on
268 = Tracker module sample rate
269 = Tracker module resample quality
270 = Low
271 = Medium
272 = High
273 = Disabled
274 = Enabled
275 = Automatic
276 = Escape
277 = Unescape
278 = Clipboard is empty!
279 = Modules
280 = Packing file %A...
281 = Playlist
282 = Stub
283 = Character
284 = Text box title
285 = Normal
286 = Ticker tape
287 = ZIP archive
288 = PPK archive
289 = Unpacking file %A...
290 = Memory monitor
291 = Update
292 = Fill
293 = Used
294 = Total
295 = Memory monitor step, ms
296 = Garbage collector threshold, %
297 = Containers
298 = Close
299 = Close all
300 = Writing file %A...
301 = Palette
302 = Color selector
303 = %A refer., %B depend.
304 = Long item scroll speed
305 = Installing color scheme...
306 = Refined gradients
307 = Transparency in gradients
308 = Text buffer size, char.
309 = Full file names
310 = In Clipboard
311 = In Favourites
312 = Enter
313 = Key assignment
314 = User-defined keys
315 = Key editor
316 = Key code
317 = Device internal handler
318 = Abbreviation
319 = Press a key...
320 = Hot %A
321 = Held %A
322 = Root
323 = File list
324 = Bit bucket
325 = RAR archiver
326 = Assign
327 = Reset
328 = Cache code pages
329 = Large font
330 = In file list
331 = In menu
332 = "Exit" in drive list
333 = Metadata format
334 = Show metadata captions
335 = Regular expressions
336 = Multiline matching
337 = Replace backreferences
[1000]
0 = Lang pack decompiler
1 = Lang pack compiler
[2000]
0 = File splice
1 = File splitter
2 = Parts count
3 = Part size
4 = File size unknown, split impossible.
[3000]
0 = MascotCapsule model viewer
1 = MascotCapsule animation viewer
2 = MascotCapsule texture loader
3 = S %A Rx %D° Ry %E° Px %G Py %H F %J
[3500]
0 = FishlabsUncoder

View File

@ -0,0 +1,17 @@
; class.package.ClassName = <offset_value>
; If you plan to obfuscate your module, don't forget to tell your obfuscator to adapt the contents of this file.
; For ProGuard it is done like that: -adaptresourcefilecontents lang/**
modules.langpack.StringUnpacker = 1000
modules.langpack.StringPacker = 1000
modules.FileSplicer = 2000
modules.FileSplitter = 2000
modules.mascot.MascotViewer = 3000
modules.mascot.AnimationViewer = 3000
modules.mascot.TextureLoader = 3000
modules.mascot.a = 3000
modules.FishlabsUncoder = 3500

View File

@ -0,0 +1,362 @@
0 = Выбор диска:
1 = Избранное
2 = Опции
3 = Выход
4 = Диск
5 = Информация о диске
6 = Общий размер:
7 = Кб
8 = байт
9 = Свободно:
10 = Выбор
11 = Удалить
12 = Удалить все
13 = Назад
14 = Имя файла не должно содержать следующих символов: %A
15 = Подтверждение
16 = Удалить запись из Избранного?
17 = Удалить все из Избранного?
18 = Да
19 = Нет
20 = Сохранить
21 = Очистить
22 = Ошибка!
23 = Файл %A уже существует. Перезаписать?
24 = Файл %A не скопирован: %B\n\n
25 = Файл %A не перемещен: %B\n\n
26 = Данный формат файла не поддерживается!
27 = Открыть
28 = Вставить
29 = Свойства
30 = Переименовать
31 = Копировать
32 = Переместить
33 = Папку...
34 = Файл...
35 = В избранное
36 = Инфо о диске
37 = Экранированные строки
38 = Настройки
39 = Помощь
40 = ОК
41 = Отмена
42 = Добавлен(ы) в буфер обмена
43 = Информация
44 = Имя папки
45 = Имя файла
46 = Размер
47 = Атрибуты
48 = Последнее изменение
49 = Переименовать
50 = Имя:
51 = Этот файл (папка) уже существует, выберите другое имя.
52 = Файл %A только для чтения!
53 = Не переименован!
54 = Показывать скрытые файлы и папки
55 = Визуальные эффекты
56 = Просмотр и выполнение
57 = Расширенное меню
58 = Повернуть на %A°
59 = Показывать сообщения об ошибках
60 = Создать папку
61 = Создать файл
62 = Папка не создана!
63 = Пожалуйста, подождите...
64 = Подождите
65 = В текущей папке
66 = На текущем диске
67 = На всех дисках
68 = масш.
69 = Внимание!
70 = Файл %A скопирован, исходный файл только для чтения.\n\n
71 = Удалить выбранный файл (папку)?
72 = Удалить отмеченные файлы?
73 = Папка удалена!
74 = Папка не пуста. Удалить рекурсивно?
75 = Файл удален.
76 = Невозможно удалить файл %A!
77 = Лиценз. соглашение
78 = Тип файла:
79 = Файл не сохранен! Выйти?
80 = Файл сохранен
81 = Буфер обмена
82 = %A - копия
83 = %A - копия (%B)
84 = Операция успешно выполнена.
85 = Файл
86 = Файл не сохранен! Снимите атрибут Read Only.
87 = Гб
88 = Выделить
89 = Выделить всё
90 = Сбросить всё
91 = Открывать неподдерживаемые типы файлов как текст
92 = Сортировка
93 = Поворот экрана
94 = Для применения настроек потребуется перезапуск.
95 = Извлечь...
96 = Извлечь всё...
97 = Извлечь в:
98 = Папка не существует и создать её невозможно!
99 = Файлы успешно извлечены.
100 = Да для всех
101 = Нет для всех
102 = Вибрация при нажатии клавиш, мс
103 = Упакован:
104 = Файл
105 = Архив
106 = Свойства
107 = Операции
108 = Создать
109 = Интерфейс
110 = Минимум визуальных эффектов
111 = Архив...
112 = Уровень сжатия
113 = Редактор ID3v1
114 = Название
115 = Исполнитель
116 = Альбом
117 = Год
118 = Комментарий
119 = Номер трека
120 = Жанр
121 = Мб
122 = Влево
123 = Вправо
124 = Вверх
125 = Вниз
126 = Левая софт
127 = Правая софт
128 = Джойстик
129 = Звонок
130 = Отмена
131 = Вверх на экран
132 = Вниз на экран
133 = Вверх на файл
134 = Вниз на файл
135 = Гор. клавиши
136 = Дополнительно
137 = Панели
138 = Панель 1
139 = Панель 2
140 = Панель 3
141 = Панель 4
142 = Панель 5
143 = Панель 6
144 = Панель 7
145 = Панель 8
146 = Панель 9
147 = Панель 10
148 = Во весь экран
149 = пусто
150 = Клавиатура...
151 = Язык / Language
152 = Цветовая схема
153 = Проверять аттрибуты файлов
154 = Точная проверка директорий
155 = Сортировка списка файлов
156 = Только чтение
157 = Скрытый
158 = Содержит
159 = %A папок, %B файлов
160 = Настройки плеера
161 = Кодировка ID3
162 = Показывать прогресс-бар
163 = Размер буфера трекерных модулей, сек.
164 = Выполнено
165 = Настройки текстового редактора
166 = Показывать символ CR
167 = Показывать символ LF
168 = Заменять табуляцию пробелами
169 = Переход
170 = Постраничная прокрутка вместо построчной
171 = Раскладка клавиатуры
172 = Начальная настройка
173 = Режим часов
174 = Переключение
175 = След. панель
176 = Пред. панель
177 = След. пустая
178 = Пред. пустая
179 = Обмен панелей
180 = Изменить
181 = Поиск
182 = Шрифт
183 = Кодировка
184 = Рекурсивный поиск
185 = Хеш-сумма
186 = Шифрование
187 = Пароль
188 = Используйте повторное шифрование с тем же паролем для расшифровки.
189 = Малый
190 = Средний
191 = Большой
192 = Тип
193 = Стиль
194 = Жирный
195 = Курсив
196 = Моноширинный
197 = Пропорциональный
198 = Системный
199 = Подчеркнутый
200 = Показывать номера пунктов меню
201 = Воспроизведение в случайном порядке
202 = Перекодировать
203 = Заказная
204 = Плейлист
205 = Искать в архивах
206 = Аудио
207 = Видео
208 = Сохранять пути
209 = Абсолютные
210 = Относительные
211 = Архиватор ZIP
212 = Архиватор PPK
213 = Аудиопроигрыватель
214 = Просмотр изображений
215 = Видеопроигрыватель
216 = Текстовый редактор
217 = Редактор заметок
218 = Трекерный проигрыватель
219 = Установщик цветовых схем
220 = Просмотр векторных изображений
221 = Курсор в виде рамки
222 = Без изменений
223 = Установить
224 = Сбросить
225 = Фоновое изображение
226 = Шаблон имени
227 = Свернуть
228 = Сохранить изменения?
229 = Сохранить как...
230 = Правка
231 = Отменить
232 = Повторить
233 = Найти
234 = Найти далее
235 = Текст
236 = Кодировка архивов
237 = Номер строки
238 = Запоминать открытые пути
239 = Шаблоны
240 = Использовать UTF BOM сигнатуру
241 = Достигнут конец файла. Продолжить поиск с начала?
242 = В начало
243 = В конец
244 = Добавить
245 = Проигрывать сигналы в сообщениях
246 = Поменять местами софт-клавиши в меню
247 = Не учитывать регистр
248 = Не сортировать
249 = По имени
250 = По типу
251 = По дате изменения
252 = По размеру
253 = Опции сортировки
254 = В обратном порядке
255 = Перезапуск
256 = Переводить курсор при выделении
257 = Заменить
258 = Заменить все
259 = Заменить на
260 = Переместить часы
261 = совпадений
262 = Эквалайзер
263 = Гц
264 = КГц
265 = дБ
266 = Использовать акселерометр
267 = Постоянная подсветка
268 = Частота дискретизации трекерных модулей
269 = Качество ресемплинга трекерных модулей
270 = Низкое
271 = Среднее
272 = Высокое
273 = Отключено
274 = Включено
275 = Автоматически
276 = Экранировать
277 = Разэкранировать
278 = Буфер обмена пуст!
279 = Модули
280 = Упаковка файла %A...
281 = Списки воспроизведения
282 = Заглушка
283 = Символ
284 = Заголовок текстового окна
285 = Обычный
286 = Бегущая строка
287 = Архив ZIP
288 = Архив PPK
289 = Распаковка файла %A...
290 = Монитор памяти
291 = Обновить
292 = Заполнить
293 = Занято
294 = Всего
295 = Шаг монитора памяти, мс
296 = Порог сборщика мусора, %
297 = Контейнеры
298 = Закрыть
299 = Закрыть все
300 = Запись файла %A...
301 = Палитра
302 = Подбор цвета
303 = %A обращ., %B завис.
304 = Скорость прокрутки длинных элементов
305 = Установка цветовой схемы...
306 = Улучшенные градиенты
307 = Прозрачность в градиентах
308 = Размер текстового буфера, симв.
309 = Полные имена файлов
310 = В Буфере обмена
311 = В Избранном
312 = Ввод
313 = Назначение клавиш
314 = Пользовательские клавиши
315 = Редактор клавиш
316 = Код клавиши
317 = Собственный обработчик устройства
318 = Аббревиатура
319 = Нажмите клавишу...
320 = Гор. %A
321 = Удерж. %A
322 = Корень
323 = Список файлов
324 = Корзина
325 = Архиватор RAR
326 = Назначить
327 = Сбросить
328 = Кешировать кодовые страницы
329 = Крупный шрифт
330 = В списке файлов
331 = В меню
332 = "Выход" в списке дисков
333 = Формат метаданных
334 = Показывать заголовки метаданных
335 = Регулярные выражения
336 = Многострочное сравнение
337 = Заменять обратные ссылки
[1000]
0 = Распаковщик языковых пакетов
1 = Запаковщик языковых пакетов
[2000]
0 = Склейка файлов
1 = Делитель файлов
2 = Количество частей
3 = Размер части
4 = Размер файла неизвестен, разделение невозможно.
[3000]
0 = Просмотр моделей MascotCapsule
1 = Просмотр анимации MascotCapsule
2 = Загрузчик текстур MascotCapsule
3 = S %A Rx %D° Ry %E° Px %G Py %H F %J
[3500]
0 = Перекодировщик Fishlabs

Binary file not shown.

View File

@ -0,0 +1,194 @@
package modules.image;
import com.one.ImageProcessor;
import com.one.vector.VectorImage;
import filemanager.images;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;
public interface ImageContainer
{
public int getWidth();
public int getHeight();
public void scale(int width, int height);
public void paint(Graphics g, int x, int y, int transform);
public long getFrameDelay();
public int currentFrame();
public void gotoFrame(int target);
public boolean nextFrame();
public boolean prevFrame();
}
class TestImageContainer implements ImageContainer
{
protected Image image;
public TestImageContainer()
{
scale(768, 576);
}
public int getWidth()
{
return image.getWidth();
}
public int getHeight()
{
return image.getHeight();
}
public void scale(int width, int height)
{
image = Image.createImage(width, height);
Graphics g = image.getGraphics();
g.setColor(0xFF000000);
g.fillRect(0, 0, width, height);
images.drawVColorTest(g, 0, 0, width, height);
g.setColor(0xFFFFFFFF);
g.drawRect(0, 0, width - 1, height - 1);
}
public void paint(Graphics g, int x, int y, int transform)
{
g.drawRegion(image, 0, 0, image.getWidth(), image.getHeight(), transform, x, y, Graphics.LEFT | Graphics.TOP);
}
public long getFrameDelay()
{
return 0;
}
public int currentFrame()
{
return 0;
}
public void gotoFrame(int target)
{
}
public boolean nextFrame()
{
return false;
}
public boolean prevFrame()
{
return false;
}
}
class GenericImageContainer implements ImageContainer
{
protected Image image;
public GenericImageContainer(Image image)
{
this.image = image;
}
public int getWidth()
{
return image.getWidth();
}
public int getHeight()
{
return image.getHeight();
}
public void scale(int width, int height)
{
image = ImageProcessor.scaleImage(image, width, height, false, true);
}
public void paint(Graphics g, int x, int y, int transform)
{
g.drawRegion(image, 0, 0, image.getWidth(), image.getHeight(), transform, x, y, Graphics.LEFT | Graphics.TOP);
}
public long getFrameDelay()
{
return 0;
}
public int currentFrame()
{
return 0;
}
public void gotoFrame(int target)
{
}
public boolean nextFrame()
{
return false;
}
public boolean prevFrame()
{
return false;
}
}
class VectorImageContainer implements ImageContainer
{
protected VectorImage image;
public VectorImageContainer(VectorImage image)
{
this.image = image;
}
public int getWidth()
{
return image.getWidth();
}
public int getHeight()
{
return image.getHeight();
}
public void scale(int width, int height)
{
image.scale(width, height);
}
public void paint(Graphics g, int width, int height, int transform)
{
image.paint(g, width, height);
}
public long getFrameDelay()
{
return image.getFrameDelay();
}
public int currentFrame()
{
return image.currentFrame();
}
public void gotoFrame(int target)
{
image.gotoFrame(target);
}
public boolean nextFrame()
{
return image.nextFrame();
}
public boolean prevFrame()
{
return image.prevFrame();
}
}

View File

@ -0,0 +1,19 @@
package modules.image;
import com.one.Application;
import com.one.PlayList;
public class ImageModule implements Application
{
public void openFile(String filename, PlayList filelist)
{
cvsImageView imageView = cvsImageView.getInstance();
if(filelist != null)
{
imageView.setPlayList(filelist);
}
imageView.displayImage(filename);
}
}

View File

@ -0,0 +1,111 @@
package modules.image;
import com.one.ModuleRegistry;
import com.one.OptionStorage;
import com.vmx.Locale;
import filemanager.main;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import javax.microedition.lcdui.Choice;
import javax.microedition.lcdui.ChoiceGroup;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Form;
public class ImageOptions implements CommandListener, OptionStorage
{
public static int rotateMode = 0;
public static boolean scaleImages = true;
public static boolean useAccelerometer = false;
protected Object parent;
protected ChoiceGroup cgPlayer;
public void showEditor(Object parent)
{
this.parent = parent;
restoreOptions();
Form form = new Form(ModuleRegistry.getModuleName(getClass().getName()));
// *** Настройки плеера ***
cgPlayer = new ChoiceGroup(null, Choice.MULTIPLE);
// Использовать акселерометр
cgPlayer.append(Locale.getString(this, Locale.PREF_USE_ACCELEROMETER), null);
cgPlayer.setSelectedIndex(0, useAccelerometer);
form.append(cgPlayer);
form.addCommand(new Command(Locale.getString(this, Locale.OK_CMD), Command.OK, 1));
form.addCommand(new Command(Locale.getString(this, Locale.CANCEL_CMD), Command.BACK, 2));
form.setCommandListener(this);
main.dsp.setCurrent(form);
}
public void commandAction(Command c, Displayable d)
{
if(c.getCommandType() == Command.OK)
{
useAccelerometer = cgPlayer.isSelected(0);
saveOptions();
}
main.dsp.setCurrent(parent);
}
public void restoreOptions()
{
try
{
byte[] data = ModuleRegistry.getModuleData(getClass().getName());
if(data == null || data.length == 0)
{
return;
}
DataInputStream dis = new DataInputStream(new ByteArrayInputStream(data));
rotateMode = dis.readInt();
scaleImages = dis.readBoolean();
useAccelerometer = dis.readBoolean();
dis.close();
}
catch(Exception e)
{
e.printStackTrace();
}
}
public void saveOptions()
{
try
{
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
dos.writeInt(rotateMode);
dos.writeBoolean(scaleImages);
dos.writeBoolean(useAccelerometer);
byte[] data = baos.toByteArray();
dos.close();
ModuleRegistry.setModuleData(getClass().getName(), data);
}
catch(Exception e)
{
e.printStackTrace();
}
}
}

View File

@ -0,0 +1,19 @@
package modules.image;
import com.one.Application;
import com.one.PlayList;
public class VectorModule implements Application
{
public void openFile(String filename, PlayList filelist)
{
cvsImageView imageView = cvsImageView.getInstance();
if(filelist != null)
{
imageView.setPlayList(filelist);
}
imageView.displayVectorImage(filename);
}
}

View File

@ -0,0 +1,780 @@
package modules.image; // переведен
import javax.microedition.lcdui.*;
import javax.microedition.lcdui.game.*;
import java.util.Timer;
import java.io.*;
import com.vmx.*;
import com.one.*;
import com.one.vector.*;
import com.one.file.*;
import filemanager.ColorScheme;
import filemanager.images;
import filemanager.main;
import java.util.Enumeration;
import java.util.TimerTask;
/**
* Класс - просмотрщик картинок
*/
public class cvsImageView extends gkcCanvas implements Runnable
{
public static final int MODE_NULL = 0;
public static final int MODE_NORMAL = 1;
public static final int MODE_VECTOR = 2;
private ImageContainer currentImage = null;
private int mode;
private boolean rotate;
private int trans;
private boolean scaled;
private boolean enableUI = true;
private int pictureWidth, pictureHeight;
private int currWidth, currHeight;
private double pictureAspect;
private int w, h;
private double aspect;
private int curposx, curposy;
private String OnlyFileName = "";
private Font nameFont;
private int hstep, vstep;
private int navx, navy, navw, navh; // большой прямоугольник
private int navcx, navcy, navcw, navch; // малый примоугольник
private Timer timer = null;
private boolean isshown;
private int runpanel;
private PlayList playlist;
private boolean allowKeyRelease = true;
protected static class AnimationTask extends TimerTask
{
protected ImageContainer image;
protected PaintableObject canvas;
public AnimationTask(ImageContainer image, PaintableObject canvas)
{
this.image = image;
this.canvas = canvas;
}
public void run()
{
synchronized(image)
{
image.nextFrame();
}
canvas.repaint();
canvas.serviceRepaints();
}
}
private static cvsImageView instance;
public static void loadInstance()
{
if(instance == null)
{
instance = new cvsImageView();
}
}
public static cvsImageView getInstance()
{
loadInstance();
return instance;
}
/**
* Конструктор
*/
public cvsImageView()
{
setFullScreenMode(true);
w = getWidth();
h = getHeight();
aspect = (double)w / (double)h;
nameFont = Font.getFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_SMALL);
//fgimage = images.createUI(w, h);
runpanel = -1;
}
public void setPlayList(PlayList newlist)
{
playlist = newlist;
}
public void setPlayList(Enumeration newlist)
{
playlist = new PlayList(newlist);
}
protected void initPanels()
{
if(timer != null)
{
timer.cancel();
timer = null;
}
mode = MODE_NULL;
currentImage = null;
if(runpanel < 0)
{
runpanel = main.manager.currentPanel();
}
main.manager.setCurrent(this, runpanel);
main.manager.updateAssociation(runpanel, playlist.getCurrentElement());
main.manager.changePanel(runpanel);
}
protected void initPlayList(String file)
{
OnlyFileName = file.substring(file.lastIndexOf('/') + 1);
if(playlist == null)
{
playlist = new PlayList(file);
}
playlist.selectElement(file);
}
protected void initDisplay()
{
// Прячем картинку за пределы экрана на время
curposx = w;
curposy = h;
pictureWidth = currentImage.getWidth();
pictureHeight = currentImage.getHeight();
switch(ImageOptions.rotateMode)
{
default:
case 0:
rotate = false;
trans = Sprite.TRANS_NONE;
break;
case 1:
rotate = true;
trans = Sprite.TRANS_ROT90;
break;
case 2:
rotate = false;
trans = Sprite.TRANS_ROT180;
break;
case 3:
rotate = true;
trans = Sprite.TRANS_ROT270;
break;
case 4:
if(pictureWidth > pictureHeight)
{
rotate = true;
trans = Sprite.TRANS_ROT90;
}
break;
case 5:
if(pictureWidth > pictureHeight)
{
rotate = true;
trans = Sprite.TRANS_ROT270;
}
break;
}
if(ImageOptions.scaleImages)
{
pictureAspect = (double)pictureWidth / (double)pictureHeight;
if(rotate) //если поворачиваем
{
/* экран повернут, так что ширина это h и высота это w */
if(pictureAspect > (1 / aspect)) //вписываем по ширине
{
currentImage.scale(h, (int)(h / pictureAspect));
}
else //вписываем по высоте
{
currentImage.scale((int)(w * pictureAspect), w);
}
}
else //если не поворачиваем
{
if(pictureAspect > aspect) //вписываем по ширине
{
currentImage.scale(w, (int)(w / pictureAspect));
}
else //вписываем по высоте
{
currentImage.scale((int)(h * pictureAspect), h);
}
}
// SHIT! Что-то мне подсказывает, что это можно было сделать проще...
}
currWidth = currentImage.getWidth();
currHeight = currentImage.getHeight();
if(currWidth != pictureWidth || currHeight != pictureHeight)
{
scaled = true;
hstep = vstep = 0;
}
else
{
scaled = false;
hstep = vstep = (w + h) / 6;
}
if(rotate)
{
currWidth ^= currHeight;
currHeight ^= currWidth;
currWidth ^= currHeight;
}
if(currWidth > currHeight) // изображение горизонтальное
{
navw = w / 4;
navh = navw * currHeight / currWidth;
}
else
{
navh = w / 4;
navw = navh * currWidth / currHeight;
}
navx = w - navw - 4;
navy = 3;
curposx = (w - currWidth) / 2;
curposy = (h - currHeight) / 2;
}
public void displayImageFromStream(InputStream is, String imgName)
{
initPanels();
mode = MODE_NORMAL;
initPlayList(imgName);
repaint();
serviceRepaints();
try
{
currentImage = new GenericImageContainer(Image.createImage(is));
is.close();
}
catch(Exception x)
{
ErrScreen.showErrMsg(123, x);
// x.printStackTrace();
//
// currentImage = new TestImageContainer();
// OnlyFileName = x.toString();
}
initDisplay();
repaint();
}
public void displayImage(String imgName)
{
try
{
FileConnection fc = (FileConnection)Connector.open("file:///" + imgName, Connector.READ);
displayImageFromStream(fc.openInputStream(), imgName);
}
catch(Exception e)
{
}
}
public void displayVectorImageFromStream(InputStream is, String imgName)
{
initPanels();
mode = MODE_VECTOR;
currentImage = null;
initPlayList(imgName);
repaint();
try
{
is = new DataInputStream(is);
currentImage = new VectorImageContainer(new VectorImage((DataInputStream)is));
is.close();
}
catch(Exception x)
{
ErrScreen.showErrMsg(124, x);
// x.printStackTrace();
//
// currentImage = new TestImageContainer();
// OnlyFileName = x.toString();
}
initDisplay();
repaint();
}
public void displayVectorImage(String imgName)
{
try
{
FileConnection fc = (FileConnection)Connector.open("file:///" + imgName, Connector.READ);
displayVectorImageFromStream(fc.openInputStream(), imgName);
}
catch(Exception e)
{
}
}
/**
* Функция отрисовки
*/
public void paint(Graphics g)
{
g.setColor(images.cImgBack); // 0x000000);
g.fillRect(0, 0, w, h);
// фон
if(currentImage != null)
{
currentImage.paint(g, curposx, curposy, trans);
}
if(enableUI)
{
if(currentImage != null && (currWidth > w || currHeight > h))
{
// ----- прямоугольники в правом верхнем углу -----
g.setColor(ColorScheme.colors[ColorScheme.back1]);
g.fillRect(navx, navy, navw, navh);
if(currWidth > w)
{
navcw = navw * w / currWidth;
navcx = navx - curposx * navw / currWidth;
}
else
{
navcw = navw;
navcx = navx;
}
if(currHeight > h)
{
navch = navh * h / currHeight;
navcy = navy - curposy * navh / currHeight;
}
else
{
navch = navh;
navcy = navy;
}
/* - такого не должно быть - см. условия выше
if(navcw > navw)
{
navcw = navw;
}
if(navch > navh)
{
navch = navh;
}
if(navcx < navx)
{
navcx = navx;
}
else if(navcx + navcw > navx + navw)
{
navcx = navx + navw - navcw;
}
if(navcy < navy)
{
navcy = navy;
}
else if(navcy + navch > navy + navh)
{
navcy = navy + navh - navch;
}
*/
g.setColor(ColorScheme.colors[ColorScheme.fore]);
g.fillRect(navcx + 1, navcy + 1, navcw, navch);
g.setColor(ColorScheme.colors[ColorScheme.dkborder]);
g.drawRect(navx, navy, navw, navh);
// ----- закончились прямоугольники -----
}
if(images.minUI != null)
{
g.drawImage(images.minUI, 0, h, Graphics.LEFT | Graphics.BOTTOM);
}
g.setFont(nameFont);
g.setColor(images.cPlayFore1); //0x800000);
g.drawString(OnlyFileName, w / 2, h - images.uiBottomHeight + images.uiBottomVSpace, Graphics.TOP | Graphics.HCENTER);
if(currentImage != null)
{
String tmp = pictureWidth + " x " + pictureHeight + " (";
if(scaled)
{
tmp += Locale.getString(this, Locale.IMAGEVIEW_SCALED) + ", ";
}
if(mode == MODE_VECTOR && currentImage != null)
{
tmp += Integer.toString(currentImage.currentFrame());
}
else
{
switch(trans)
{
case Sprite.TRANS_NONE:
tmp += "";
break;
case Sprite.TRANS_ROT90:
tmp += "90°";
break;
case Sprite.TRANS_ROT180:
tmp += "180°";
break;
case Sprite.TRANS_ROT270:
tmp += "270°";
break;
}
}
tmp += ")";
g.setColor(images.cPlayFore2); //0x000080);
g.drawString(tmp, w / 2, h - images.uiBottomVSpace, Graphics.BOTTOM | Graphics.HCENTER);
}
}
}
public void keyReleased(int keyCode)
{
if(allowKeyRelease)
{
handleKeyAction(keyCode);
}
else
{
allowKeyRelease = true;
}
}
public void keyRepeated(int keyCode)
{
allowKeyRelease = false;
handleKeyAction(keyCode);
}
/**
* Обработчик нажатий клавиш
*/
public void handleKeyAction(int keyCode)
{
keyCode = rotateKey(keyCode, trans);
if(keyCode == KEY_POUND)
{
enableUI = !enableUI;
repaint();
}
else if(keyCode == KEY_DOWN || keyCode == KEY_RIGHT) // Следующая картинка
{
nextPicture();
}
else if(keyCode == KEY_UP || keyCode == KEY_LEFT) // Предыдущ картинка
{
prevPicture();
}
else if(keyCode == KEY_LSK)
{
if(mode == MODE_VECTOR)
{
if(timer != null)
{
timer.cancel();
timer = null;
}
else
{
timer = new Timer();
timer.scheduleAtFixedRate(new AnimationTask(currentImage, this), 0, currentImage.getFrameDelay());
}
}
}
else if(keyCode == KEY_RSK) // Выход
{
if(timer != null)
{
timer.cancel();
timer = null;
}
mode = MODE_NULL;
playlist.cancelSearch();
playlist = null;
main.manager.ret();
runpanel = -1;
}
else if(keyCode == KEY_CANCEL) // сворачиваемся
{
main.manager.minimizePanel();
}
else if(keyCode == KEY_NUM4)
{
curposx += hstep;
if(curposx > 0)
{
curposx = 0;
}
repaint();
}
else if(keyCode == KEY_NUM6)
{
curposx -= hstep;
if(curposx < w - currWidth)
{
curposx = w - currWidth;
}
repaint();
}
else if(keyCode == KEY_NUM2)
{
curposy += vstep;
if(curposy > 0)
{
curposy = 0;
}
repaint();
}
else if(keyCode == KEY_NUM8)
{
curposy -= vstep;
if(curposy < h - currHeight)
{
curposy = h - currHeight;
}
repaint();
}
else if(keyCode == KEY_NUM5)
{
curposx = (w - currWidth) / 2;
curposy = (h - currHeight) / 2;
repaint();
}
else if(keyCode == KEY_STAR)
{
if(++ImageOptions.rotateMode > 3)
{
ImageOptions.rotateMode = 0;
}
redisplay();
}
else if(keyCode == KEY_NUM0)
{
// если не вышло масштабировать,
// то нечего и переключать
boolean wasrunning = timer != null;
int prevframe = currentImage.currentFrame();
if(wasrunning)
{
timer.cancel();
timer = null;
}
ImageOptions.scaleImages = !scaled;
redisplay();
currentImage.gotoFrame(prevframe);
if(wasrunning)
{
timer = new Timer();
timer.scheduleAtFixedRate(new AnimationTask(currentImage, this), 0, currentImage.getFrameDelay());
}
}
else if(keyCode == KEY_NUM1)
{
if(timer == null)
{
if(mode == MODE_VECTOR)
{
currentImage.prevFrame();
repaint();
}
}
}
else if(keyCode == KEY_NUM3)
{
if(timer == null)
{
if(mode == MODE_VECTOR)
{
currentImage.nextFrame();
repaint();
}
}
}
else if(keyCode == KEY_NUM7)
{
if(timer == null)
{
if(mode == MODE_VECTOR)
{
currentImage.gotoFrame(currentImage.currentFrame() - 10);
repaint();
}
}
}
else if(keyCode == KEY_NUM9)
{
if(timer == null)
{
if(mode == MODE_VECTOR)
{
currentImage.gotoFrame(currentImage.currentFrame() + 10);
repaint();
}
}
}
}
/**
* следующая картинка
*/
public void nextPicture()
{
playlist.nextElement(false);
main.FileSelect.executeFile(playlist, null, runpanel);
}
/**
* предыдущая картинка
*/
public void prevPicture()
{
playlist.prevElement(false);
main.FileSelect.executeFile(playlist, null, runpanel);
}
private void redisplay()
{
if(mode == MODE_VECTOR)
{
currentImage.scale(-1, -1);
initDisplay();
repaint();
}
else
{
main.FileSelect.executeFile(playlist, null, runpanel);
}
}
public void showNotify()
{
isshown = true;
if(ImageOptions.useAccelerometer)
{
(new Thread(this, "ImageView/AccelEvent")).start();
}
}
public void hideNotify()
{
isshown = false;
}
public void run()
{
while(isshown)
{
int delta = main.accelerometer.getDelta(0, 1200);
if(currentImage != null || currentImage != null)
{
if(delta != 0)
{
if(delta > 0)
{
nextPicture();
}
else
{
prevPicture();
}
}
}
try
{
Thread.sleep(300);
}
catch(InterruptedException ie)
{
}
}
}
}

View File

@ -0,0 +1,34 @@
package modules;
import com.one.Application;
import com.one.ModuleRegistry;
import com.one.PlayList;
import com.vmx.Locale;
import filemanager.main;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Form;
public class DummyModule implements Application, CommandListener
{
protected Object parent;
public void openFile(String filename, PlayList filelist)
{
Form form = new Form(ModuleRegistry.getModuleName(getClass().getName()));
form.append(filename);
form.addCommand(new Command(Locale.getString(this, Locale.OK_CMD), Command.OK, 1));
form.setCommandListener(this);
parent = main.dsp.getCurrent();
main.dsp.setCurrent(form);
}
public void commandAction(Command c, Displayable dp)
{
main.dsp.setCurrent(parent);
}
}

View File

@ -0,0 +1,34 @@
package modules.color;
import com.one.BufferedInputStream;
import com.one.FileSource;
import com.one.PlainPackage;
import com.one.file.Connector;
import com.one.file.FileConnection;
import filemanager.ColorScheme;
import filemanager.main;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
public class ColorFileSource implements FileSource
{
public void createFile(String filename) throws IOException
{
FileConnection fc = (FileConnection)Connector.open("file:///" + filename);
PlainPackage ppk = new PlainPackage();
ppk.init(fc, true);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ColorScheme.saveColorScheme(baos);
byte[] data = baos.toByteArray();
baos.close();
ppk.addEntry(new BufferedInputStream(data), "scheme.ini", -1, true, null);
ppk.close();
main.FileSelect.showWait(filename.substring(filename.lastIndexOf('/') + 1));
}
}

View File

@ -0,0 +1,80 @@
package modules.color;
import com.one.Application;
import com.one.PlainPackage;
import com.one.PlayList;
import com.one.ProgressBar;
import com.one.TextProcessor;
import com.one.file.Connector;
import com.one.file.FileConnection;
import com.vmx.Locale;
import com.vmx.ProgressCallback;
import filemanager.ColorScheme;
import filemanager.main;
import filemanager.options;
import java.io.DataInputStream;
import java.io.IOException;
public class ColorModule implements Application
{
public void openFile(String filename, PlayList filelist) throws IOException
{
options.colorScheme = ColorScheme.SCHEME_CUSTOM;
FileConnection fc = (FileConnection)Connector.open("file:///" + filename);
DataInputStream dis = fc.openDataInputStream();
byte[] sig = new byte[3];
dis.readFully(sig);
String s = TextProcessor.byteArrayToString(sig);
if(s.equals("MCS") || s.equals("Ths"))
{
ColorScheme.loadLegacyColorScheme(dis);
dis.close();
fc.close();
if(main.dsp.getCurrent() != main.FileSelect)
{
main.dsp.setCurrent(main.FileSelect);
}
//main.FileSelect.updateGradients();
main.FileSelect.repaint();
}
else
{
dis.close();
ProgressCallback callback = ProgressBar.getProgressCallback();
callback.setProgress(0);
callback.setText(Locale.getString(getClass().getName(), Locale.INSTALLING_COLOR_SCHEME));
PlainPackage ppk = new PlainPackage();
ppk.init(fc, false);
if(ColorScheme.loadModernColorScheme(ppk))
{
//main.FileSelect.updateGradients();
main.FileSelect.updateModuleList();
main.FileSelect.showWait(main.currentFile);
}
else
{
if(main.dsp.getCurrent() != main.FileSelect)
{
main.dsp.setCurrent(main.FileSelect);
}
//main.FileSelect.updateGradients();
main.FileSelect.repaint();
}
ppk.close();
}
}
}

View File

@ -0,0 +1,151 @@
package modules.playlist;
import com.one.ErrScreen;
import com.one.FileSource;
import com.one.ModuleRegistry;
import com.one.file.Connector;
import com.one.file.FileConnection;
import com.vmx.AuxClass;
import com.vmx.Locale;
import com.vmx.OutputStreamEncoder;
import com.vmx.StringEncoder;
import filemanager.Buffer;
import filemanager.main;
import java.io.IOException;
import java.util.Enumeration;
import java.util.Vector;
import javax.microedition.lcdui.AlertType;
import javax.microedition.lcdui.Choice;
import javax.microedition.lcdui.ChoiceGroup;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Form;
public class M3UFileSource implements FileSource, CommandListener
{
protected Object parent;
protected String filename;
protected ChoiceGroup cgType;
public void createFile(String filename) throws IOException
{
this.filename = filename;
Form form = new Form(ModuleRegistry.getModuleName(getClass().getName()));
cgType = new ChoiceGroup(/* Locale.getString(this, Locale.FILE_TYPE) */ null, Choice.EXCLUSIVE);
Enumeration groups = ModuleRegistry.listSimalarityGroups();
String group;
while(groups.hasMoreElements())
{
group = (String)groups.nextElement();
cgType.append(group, ModuleRegistry.getIcon((String)ModuleRegistry.listSimilars(group).nextElement()));
}
cgType.setSelectedIndex(0, true);
form.append(cgType);
form.addCommand(new Command(Locale.getString(this, Locale.OK_CMD), Command.OK, 1));
form.addCommand(new Command(Locale.getString(this, Locale.CANCEL_CMD), Command.CANCEL, 2));
form.setCommandListener(this);
parent = main.dsp.getCurrent();
main.dsp.setCurrent(form);
}
public void commandAction(Command c, Displayable dp)
{
if(c.getCommandType() == Command.OK)
{
try
{
if(Buffer.getSize() == 0)
{
main.showMessage(Locale.getString(this, Locale.ERROR), Locale.getString(this, Locale.BUFFER_EMPTY), AlertType.WARNING, 3000, main.dsp.getCurrent());
return;
}
Vector group = AuxClass.enumerationToVector(ModuleRegistry.listSimilars(cgType.getString(cgType.getSelectedIndex())), null);
FileConnection fc = (FileConnection)Connector.open("file:///" + filename);
if(fc.exists())
{
fc.truncate(0);
}
else
{
fc.create();
}
OutputStreamEncoder ose = new OutputStreamEncoder(fc.openOutputStream(), StringEncoder.ENC_DEFAULT);
ose.writeBOM();
String disk = filename.substring(0, filename.indexOf('/'));
String path = filename.substring(0, filename.lastIndexOf('/') + 1);
int dlen = disk.length();
int plen = path.length();
Buffer.flattenBuffer();
//Buffer.sortBuffer();
Enumeration buf = Buffer.getBuffer();
String s, module;
int index;
while(buf.hasMoreElements())
{
s = (String)buf.nextElement();
index = s.lastIndexOf('.');
if(index >= 0)
{
module = ModuleRegistry.getModule(s.substring(index + 1));
if(module != null && group.contains(module))
{
if(s.startsWith(path))
{
ose.writeString(s.substring(plen).replace('/', '\\'));
}
else if(s.startsWith(disk))
{
ose.writeString(s.substring(dlen).replace('/', '\\'));
}
else
{
ose.writeString(s.replace('/', '\\'));
}
ose.writeChar('\r');
ose.writeChar('\n');
}
}
}
ose.close();
fc.close();
Buffer.clear();
main.FileSelect.showWait(filename.substring(filename.lastIndexOf('/') + 1));
}
catch(Exception e)
{
ErrScreen.showErrMsg(20400, e);
}
}
else
{
main.dsp.setCurrent(parent);
}
}
}

View File

@ -0,0 +1,54 @@
package modules.playlist;
import com.one.Application;
import com.one.IniFile;
import com.one.file.Connector;
import com.one.file.FileConnection;
import com.vmx.InputStreamDecoder;
import com.one.PlayList;
import filemanager.main;
import java.io.IOException;
import java.util.Vector;
public class M3UModule implements Application
{
public void openFile(String filename, PlayList filelist) throws IOException
{
FileConnection fc = (FileConnection)Connector.open("file:///" + filename);
InputStreamDecoder isd = InputStreamDecoder.getFileDecoder(fc);
String disk = filename.substring(0, filename.indexOf('/'));
String path = filename.substring(0, filename.lastIndexOf('/') + 1);
Vector files = new Vector();
String s;
while((s = IniFile.readIniLine(isd)) != null)
{
if(s.startsWith("#"))
{
continue;
}
s = s.replace('\\', '/');
if(s.indexOf(':') >= 0)
{
files.addElement(s);
}
else if(s.startsWith("/"))
{
files.addElement(disk + s);
}
else
{
files.addElement(path + s);
}
}
isd.close();
fc.close();
main.FileSelect.executeFile(new PlayList(files.elements()), null, main.manager.currentPanel());
}
}

Binary file not shown.

Binary file not shown.

BIN
other/uni_icons/Gray.ncs Normal file

Binary file not shown.

BIN
other/uni_icons/Pink.ncs Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
res/chars/chars.dat Normal file

Binary file not shown.

126
res/config/genres.ini Normal file
View File

@ -0,0 +1,126 @@
0 = Blues
1 = Classic Rock
2 = Country
3 = Dance
4 = Disco
5 = Funk
6 = Grunge
7 = Hip-Hop
8 = Jazz
9 = Metal
10 = New Age
11 = Oldies
12 = Other
13 = Pop
14 = R&B
15 = Rap
16 = Reggae
17 = Rock
18 = Techno
19 = Industrial
20 = Alternative
21 = Ska
22 = Death Metal
23 = Pranks
24 = Soundtrack
25 = Euro-Techno
26 = Ambient
27 = Trip-Hop
28 = Vocal
29 = Jazz+Funk
30 = Fusion
31 = Trance
32 = Classical
33 = Instrumental
34 = Acid
35 = House
36 = Game
37 = Sound Clip
38 = Gospel
39 = Noise
40 = AlternRock
41 = Bass
42 = Soul
43 = Punk
44 = Space
45 = Meditative
46 = Instrumental Pop
47 = Instrumental Rock
48 = Ethnic
49 = Gothic
50 = Darkwave
51 = Techno-Industrial
52 = Electronic
53 = Pop-Folk
54 = Eurodance
55 = Dream
56 = Southern Rock
57 = Comedy
58 = Cult
59 = Gangsta
60 = Top 40
61 = Christian Rap
62 = Pop/Funk
63 = Jungle
64 = Native American
65 = Cabaret
66 = New Wave
67 = Psychadelic
68 = Rave
69 = Showtunes
70 = Trailer
71 = Lo-Fi
72 = Tribal
73 = Acid Punk
74 = Acid Jazz
75 = Polka
76 = Retro
77 = Musical
78 = Rock & Roll
79 = Hard Rock
80 = Folk
81 = Folk-Rock
82 = National Folk
83 = Swing
84 = Fast Fusion
85 = Bebob
86 = Latin
87 = Revival
88 = Celtic
89 = Bluegrass
90 = Avantgarde
91 = Gothic Rock
92 = Progressive Rock
93 = Psychedelic Rock
94 = Symphonic Rock
95 = Slow Rock
96 = Big Band
97 = Chorus
98 = Easy Listening
99 = Acoustic
100 = Humour
101 = Speech
102 = Chanson
103 = Opera
104 = Chamber Music
105 = Sonata
106 = Symphony
107 = Booty Bass
108 = Primus
109 = Porn Groove
110 = Satire
111 = Slow Jam
112 = Club
113 = Tango
114 = Samba
115 = Folklore
116 = Ballad
117 = Power Ballad
118 = Rhythmic Soul
119 = Freestyle
120 = Duet
121 = Punk Rock
122 = Drum Solo
123 = A capella
124 = Euro-House
125 = Dance Hall

3
res/config/groups.ini Normal file
View File

@ -0,0 +1,3 @@
Audio = modules.audio.AudioModule, modules.audio.TrackerModule
Video = modules.video.VideoModule
Image = modules.image.ImageModule, modules.image.VectorModule

12
res/config/keymap.ini Normal file
View File

@ -0,0 +1,12 @@
; Something = UP DOWN LEFT RIGHT FIRE LSK RSK DIAL CANCEL BACK CLEAR
; Siemens = -59 -60 -61 -62 -26 -1 -4 -11 -12 0 0
; Sony Ericsson = -1 -2 -3 -4 -5 -6 -7 0 0 -11 -8
; Motorola = -1 -6 -2 -5 -20 -21 -22 -10 0 0 0
; Something = UP DOWN LEFT RIGHT FIRE LSK RSK GREEN RED
Sony Ericsson (JP-7) = -1 -2 -3 -4 -5 -6 -7 -8 -11
Sony Ericsson (JP-8) = -1 -2 -3 -4 -5 -6 -7 -8 -10
Siemens = -59 -60 -61 -62 -26 -1 -4 -11 -12
Motorola = -1 -6 -2 -5 -20 -21 -22 -10 0

22
res/config/mime.ini Normal file
View File

@ -0,0 +1,22 @@
; Here we map file extensions with MIME types.
; This mapping is used when opening sounds and videos from streams.
; audio
.mid = audio/midi
.midi = audio/midi
.kar = audio/midi
.imy = audio/imy
.bas = audio/bas
.wav = audio/x-wav
.wave = audio/x-wav
.amr = audio/amr
.mp3 = audio/mpeg
.m4a = audio/m4a
.aac = audio/aac
.wma = audio/x-ms-wma
; video
.3gp = video/3gpp
.mp4 = video/mp4
.wmv = video/x-ms-wmv
.mpeg = video/mpeg

58
res/config/modules.ini Normal file
View File

@ -0,0 +1,58 @@
; This file describes modules in general.
; Sections, like [Container] or [Application], define type of a module. Containers are used to transparently open various archives and packages of files, Applications are used to display file contents to the user and to edit those contents.
; FileSources are used to create new files. ContainerSources are technically similar to FileSources, but are used to create containers rather than simple files and are stored in separate internal list.
; Each record in this file has the following syntax:
; module.package.ModuleClass = <explicit_name | #localized_string_identifier> [, icon_file.ext [@ x, y, width, height]]
; If you plan to obfuscate your module, don't forget to tell your obfuscator to adapt the contents of this file.
; For ProGuard it is done like that: -adaptresourcefilecontents config/*
[Container]
com.classpath.zip.ZipFile = # 211, icons.png @ 80, 0, 16, 16
com.innosystec.unrar.Archive = # 325, icons.png @ 80, 0, 16, 16
com.one.PlainPackage = # 212, icons.png @ 80, 0, 16, 16
[Application]
;modules.PlatformRequestModule = # 317, icons.png @ 0, 0, 16, 16
modules.audio.AudioModule = # 213, icons.png @ 16, 0, 16, 16
modules.image.ImageModule = # 214, icons.png @ 32, 0, 16, 16
modules.video.VideoModule = # 215, icons.png @ 48, 0, 16, 16
modules.text.TextModule = # 216, icons.png @ 64, 0, 16, 16
modules.TMOModule = # 217, icons.png @ 96, 0, 16, 16
modules.audio.TrackerModule = # 218, icons.png @ 16, 0, 16, 16
modules.color.ColorModule = # 219, icons.png @ 32, 0, 16, 16
modules.image.VectorModule = # 220, icons.png @ 32, 0, 16, 16
modules.mascot.MascotViewer = # 0, icons.png @ 32, 0, 16, 16
modules.mascot.AnimationViewer = # 1, icons.png @ 48, 0, 16, 16
modules.mascot.TextureLoader = # 2, icons.png @ 32, 0, 16, 16
modules.id3Editor = # 113, icons.png @ 16, 0, 16, 16
modules.playlist.M3UModule = # 281, icons.png @ 16, 0, 16, 16
modules.FileSplitter = # 1, icons.png @ 0, 0, 16, 16
modules.FishlabsUncoder = # 0, icons.png @ 0, 0, 16, 16
modules.mocha.Decompiler = # 1, icons.png @ 64, 0, 16, 16
modules.SWFViewer = # 2, icons.png @ 32, 0, 16, 16
modules.HideFile = # 3, icons.png @ 0, 0, 16, 16
modules.langpack.StringUnpacker = # 0, icons.png @ 400, 0, 16, 16
modules.langpack.StringPacker = # 1, icons.png @ 528, 0, 16, 16
;modules.DummyModule = Dummy module, icons.png @ 0, 0, 16, 16
[FileSource]
modules.text.TextFileSource = # 235, icons.png @ 64, 0, 16, 16
modules.NullFileSource = # 282, icons.png @ 0, 0, 16, 16
modules.FileSplicer = # 0, icons.png @ 0, 0, 16, 16
modules.playlist.M3UFileSource = # 204, icons.png @ 16, 0, 16, 16
modules.color.ColorFileSource = # 152, icons.png @ 32, 0, 16, 16
[ContainerSource]
modules.ZipFileSource = # 287, icons.png @ 80, 0, 16, 16
modules.PPKFileSource = # 288, icons.png @ 80, 0, 16, 16
;[Operation]
;test.TestModule = TestName, icons.png

15
res/config/options.ini Normal file
View File

@ -0,0 +1,15 @@
; This file contains a list of OptionStorages.
; OptionStorage is a special submodule responsible for management of it's main module settings.
; Each record in this file has the following syntax:
; module.package.ModuleClass = <explicit_name | #localized_string_identifier>
; If you plan to obfuscate your module, don't forget to tell your obfuscator to adapt the contents of this file.
; For ProGuard it is done like that: -adaptresourcefilecontents config/*
modules.ZipOptions = # 211
modules.RarOptions = # 325
modules.audio.AudioOptions = # 213
modules.video.VideoOptions = # 215
modules.image.ImageOptions = # 214
modules.text.TextOptions = # 216

58
res/config/palette.ini Normal file
View File

@ -0,0 +1,58 @@
COLS = 8
ROWS = 6
0 = FFFF8080
1 = FFFF0000
2 = FF804040
3 = FF800000
4 = FF400000
5 = FF000000
6 = FFFFFF80
7 = FFFFFF00
8 = FFFF8040
9 = FFFF8000
10 = FF804000
11 = FF808000
12 = FF80FF80
13 = FF80FF00
14 = FF00FF00
15 = FF008000
16 = FF004000
17 = FF808040
18 = FF00FF80
19 = FF00FF40
20 = FF008080
21 = FF008040
22 = FF004040
23 = FF808080
24 = FF80FFFF
25 = FF00FFFF
26 = FF004080
27 = FF0000FF
28 = FF000080
29 = FF408080
30 = FF0080FF
31 = FF0080C0
32 = FF8080FF
33 = FF0000A0
34 = FF000040
35 = FFC0C0C0
36 = FFFF80C0
37 = FF8080C0
38 = FF800040
39 = FF800080
40 = FF400040
41 = FF400040
42 = FFFF80FF
43 = FFFF00FF
44 = FFFF0080
45 = FF8000FF
46 = FF400080
47 = FFFFFFFF

52
res/config/types.ini Normal file
View File

@ -0,0 +1,52 @@
; Here we map file extensions with modules used to open files with such extensions.
; Module names are the same as in modules.ini
; Each record has the following syntax:
; ext1 [ext2 [ext3 ...]] = module.package.ModuleClass
[Open]
zip jar sdt scs nth = com.classpath.zip.ZipFile
rar = com.innosystec.unrar.Archive
ppk = com.one.PlainPackage
mid amr wav aac mp3 imy m4a xmf awb midi wma ra = modules.audio.AudioModule
jpg jpe gif png bmx jpeg wbmp ico = modules.image.ImageModule
3gp mp4 m4v wmv rm = modules.video.VideoModule
txt jad log ini inf cdf xml col j java jcc mf = modules.text.TextModule
tmo vcs vnt = modules.TMOModule
mod xm s3m = modules.audio.TrackerModule
ncs mcs ths = modules.color.ColorModule
mvi = modules.image.VectorModule
mbac = modules.mascot.MascotViewer
mtra = modules.mascot.AnimationViewer
bmp = modules.mascot.TextureLoader
m3u = modules.playlist.M3UModule
class = modules.mocha.Decompiler
swf = modules.SWFViewer
;htm html mht mhtml wml = modules.PlatformRequestModule
; Next, we need to map extensions to file creation modules. The syntax is expectingly reversed,
; but note that there must be only one extension for each module:
; module.package.ModuleClass = ext
; All extensions assigned here are just the default ones, user will be able to edit them when creating file.
; If some module is not mentioned down there, then no default file extension will be assigned to it.
[Create]
modules.ZipFileSource = zip
modules.PPKFileSource = ppk
modules.text.TextFileSource = txt
modules.playlist.M3UFileSource = m3u
modules.color.ColorFileSource = ncs
modules.NullFileSource = stub
modules.FileSplicer = splice
; The same as previous section, except that these modules don't create anything,
; but some other modules need to know, which files are opened with them.
[Special]
modules.mascot.MascotViewer = mbac

256
res/config/unipalette.ini Normal file
View File

@ -0,0 +1,256 @@
0 = FF000000
1 = FF800000
2 = FF008000
3 = FF808000
4 = FF000080
5 = FF800080
6 = FF008080
7 = FF808080
8 = FFC0C0C0
9 = FFFF0000
10 = FF00FF00
11 = FFFFFF00
12 = FF0000FF
13 = FFFF00FF
14 = FF00FFFF
15 = FFFFFFFF
16 = FF000000
17 = FF000000
18 = FF000000
19 = FF000000
20 = FF000000
21 = FF000000
22 = FF000000
23 = FF000000
24 = FF000000
25 = FF000000
26 = FF000000
27 = FF000000
28 = FF000000
29 = FF000000
30 = FF000000
31 = FF000000
32 = FF000000
33 = FF000000
34 = FF000000
35 = FF000000
36 = FF000000
37 = FF000000
38 = FF000000
39 = FF000000
40 = FF000000
41 = FF000033
42 = FF000066
43 = FF000099
44 = FF0000CC
45 = FF0000FF
46 = FF003300
47 = FF003333
48 = FF003366
49 = FF003399
50 = FF0033CC
51 = FF0033FF
52 = FF006600
53 = FF006633
54 = FF006666
55 = FF006699
56 = FF0066CC
57 = FF0066FF
58 = FF009900
59 = FF009933
60 = FF009966
61 = FF009999
62 = FF0099CC
63 = FF0099FF
64 = FF00CC00
65 = FF00CC33
66 = FF00CC66
67 = FF00CC99
68 = FF00CCCC
69 = FF00CCFF
70 = FF00FF00
71 = FF00FF33
72 = FF00FF66
73 = FF00FF99
74 = FF00FFCC
75 = FF00FFFF
76 = FF330000
77 = FF330033
78 = FF330066
79 = FF330099
80 = FF3300CC
81 = FF3300FF
82 = FF333300
83 = FF333333
84 = FF333366
85 = FF333399
86 = FF3333CC
87 = FF3333FF
88 = FF336600
89 = FF336633
90 = FF336666
91 = FF336699
92 = FF3366CC
93 = FF3366FF
94 = FF339900
95 = FF339933
96 = FF339966
97 = FF339999
98 = FF3399CC
99 = FF3399FF
100 = FF33CC00
101 = FF33CC33
102 = FF33CC66
103 = FF33CC99
104 = FF33CCCC
105 = FF33CCFF
106 = FF33FF00
107 = FF33FF33
108 = FF33FF66
109 = FF33FF99
110 = FF33FFCC
111 = FF33FFFF
112 = FF660000
113 = FF660033
114 = FF660066
115 = FF660099
116 = FF6600CC
117 = FF6600FF
118 = FF663300
119 = FF663333
120 = FF663366
121 = FF663399
122 = FF6633CC
123 = FF6633FF
124 = FF666600
125 = FF666633
126 = FF666666
127 = FF666699
128 = FF6666CC
129 = FF6666FF
130 = FF669900
131 = FF669933
132 = FF669966
133 = FF669999
134 = FF6699CC
135 = FF6699FF
136 = FF66CC00
137 = FF66CC33
138 = FF66CC66
139 = FF66CC99
140 = FF66CCCC
141 = FF66CCFF
142 = FF66FF00
143 = FF66FF33
144 = FF66FF66
145 = FF66FF99
146 = FF66FFCC
147 = FF66FFFF
148 = FF990000
149 = FF990033
150 = FF990066
151 = FF990099
152 = FF9900CC
153 = FF9900FF
154 = FF993300
155 = FF993333
156 = FF993366
157 = FF993399
158 = FF9933CC
159 = FF9933FF
160 = FF996600
161 = FF996633
162 = FF996666
163 = FF996699
164 = FF9966CC
165 = FF9966FF
166 = FF999900
167 = FF999933
168 = FF999966
169 = FF999999
170 = FF9999CC
171 = FF9999FF
172 = FF99CC00
173 = FF99CC33
174 = FF99CC66
175 = FF99CC99
176 = FF99CCCC
177 = FF99CCFF
178 = FF99FF00
179 = FF99FF33
180 = FF99FF66
181 = FF99FF99
182 = FF99FFCC
183 = FF99FFFF
184 = FFCC0000
185 = FFCC0033
186 = FFCC0066
187 = FFCC0099
188 = FFCC00CC
189 = FFCC00FF
190 = FFCC3300
191 = FFCC3333
192 = FFCC3366
193 = FFCC3399
194 = FFCC33CC
195 = FFCC33FF
196 = FFCC6600
197 = FFCC6633
198 = FFCC6666
199 = FFCC6699
200 = FFCC66CC
201 = FFCC66FF
202 = FFCC9900
203 = FFCC9933
204 = FFCC9966
205 = FFCC9999
206 = FFCC99CC
207 = FFCC99FF
208 = FFCCCC00
209 = FFCCCC33
210 = FFCCCC66
211 = FFCCCC99
212 = FFCCCCCC
213 = FFCCCCFF
214 = FFCCFF00
215 = FFCCFF33
216 = FFCCFF66
217 = FFCCFF99
218 = FFCCFFCC
219 = FFCCFFFF
220 = FFFF0000
221 = FFFF0033
222 = FFFF0066
223 = FFFF0099
224 = FFFF00CC
225 = FFFF00FF
226 = FFFF3300
227 = FFFF3333
228 = FFFF3366
229 = FFFF3399
230 = FFFF33CC
231 = FFFF33FF
232 = FFFF6600
233 = FFFF6633
234 = FFFF6666
235 = FFFF6699
236 = FFFF66CC
237 = FFFF66FF
238 = FFFF9900
239 = FFFF9933
240 = FFFF9966
241 = FFFF9999
242 = FFFF99CC
243 = FFFF99FF
244 = FFFFCC00
245 = FFFFCC33
246 = FFFFCC66
247 = FFFFCC99
248 = FFFFCCCC
249 = FFFFCCFF
250 = FFFFFF00
251 = FFFFFF33
252 = FFFFFF66
253 = FFFFFF99
254 = FFFFFFCC
255 = FFFFFFFF

10
res/enc/ReadMe.txt Normal file
View File

@ -0,0 +1,10 @@
Encodings, or code pages (CP), are now supported as text files along with binary files. Here only text variation is described, binaries are considered as obsolete.
A typical code page would consist of 128 lines - for 128 bytes from 0x80 to 0xFF. It's those bytes the meaning of which varies from CP to CP, the meaning of the upper half of the code page (bytes 0x0 to 0x7F) is constant.
Each line maps byte value to Unicode character value, like that:
80 = 20AC ; ˆ
Here 80 is a byte value, 20AC is a character value, and the rest - semicolon and actual symbol - is an optional comment, placed here just to make code page easier for human reading. All numbers are hexadecimal.
All code pages must be either in Unicode with BOM, or in a one-byte encoding denoted in enc.ini (see) as DEFAULT.

128
res/enc/cp1251.ini Normal file
View File

@ -0,0 +1,128 @@
80 = 402 ; Ђ
81 = 403 ; Ѓ
82 = 201A ;
83 = 453 ; ѓ
84 = 201E ; „
85 = 2026 ; …
86 = 2020 ; †
87 = 2021 ; ‡
88 = 20AC ; €
89 = 2030 ; ‰
8A = 409 ; Љ
8B = 2039 ;
8C = 40A ; Њ
8D = 40C ; Ќ
8E = 40B ; Ћ
8F = 40F ; Џ
90 = 452 ; ђ
91 = 2018 ;
92 = 2019 ;
93 = 201C ; “
94 = 201D ; ”
95 = 2022 ; •
96 = 2013 ;
97 = 2014 ; —
98 = 20 ;
99 = 2122 ; ™
9A = 459 ; љ
9B = 203A ;
9C = 45A ; њ
9D = 45C ; ќ
9E = 45B ; ћ
9F = 45F ; џ
A0 = A0 ;  
A1 = 40E ; Ў
A2 = 45E ; ў
A3 = 408 ; Ј
A4 = A4 ; ¤
A5 = 490 ; Ґ
A6 = A6 ; ¦
A7 = A7 ; §
A8 = 401 ; Ё
A9 = A9 ; ©
AA = 404 ; Є
AB = AB ; «
AC = AC ; ¬
AD = AD ; ­
AE = AE ; ®
AF = 407 ; Ї
B0 = B0 ; °
B1 = B1 ; ±
B2 = 406 ; І
B3 = 456 ; і
B4 = 491 ; ґ
B5 = B5 ; µ
B6 = B6 ; ¶
B7 = B7 ; ·
B8 = 451 ; ё
B9 = 2116 ; №
BA = 454 ; є
BB = BB ; »
BC = 458 ; ј
BD = 405 ; Ѕ
BE = 455 ; ѕ
BF = 457 ; ї
C0 = 410 ; А
C1 = 411 ; Б
C2 = 412 ; В
C3 = 413 ; Г
C4 = 414 ; Д
C5 = 415 ; Е
C6 = 416 ; Ж
C7 = 417 ; З
C8 = 418 ; И
C9 = 419 ; Й
CA = 41A ; К
CB = 41B ; Л
CC = 41C ; М
CD = 41D ; Н
CE = 41E ; О
CF = 41F ; П
D0 = 420 ; Р
D1 = 421 ; С
D2 = 422 ; Т
D3 = 423 ; У
D4 = 424 ; Ф
D5 = 425 ; Х
D6 = 426 ; Ц
D7 = 427 ; Ч
D8 = 428 ; Ш
D9 = 429 ; Щ
DA = 42A ; Ъ
DB = 42B ; Ы
DC = 42C ; Ь
DD = 42D ; Э
DE = 42E ; Ю
DF = 42F ; Я
E0 = 430 ; а
E1 = 431 ; б
E2 = 432 ; в
E3 = 433 ; г
E4 = 434 ; д
E5 = 435 ; е
E6 = 436 ; ж
E7 = 437 ; з
E8 = 438 ; и
E9 = 439 ; й
EA = 43A ; к
EB = 43B ; л
EC = 43C ; м
ED = 43D ; н
EE = 43E ; о
EF = 43F ; п
F0 = 440 ; р
F1 = 441 ; с
F2 = 442 ; т
F3 = 443 ; у
F4 = 444 ; ф
F5 = 445 ; х
F6 = 446 ; ц
F7 = 447 ; ч
F8 = 448 ; ш
F9 = 449 ; щ
FA = 44A ; ъ
FB = 44B ; ы
FC = 44C ; ь
FD = 44D ; э
FE = 44E ; ю
FF = 44F ; я

128
res/enc/cp1252.ini Normal file
View File

@ -0,0 +1,128 @@
80 = 20AC ; €
81 = 20 ;
82 = 201A ;
83 = 192 ; ƒ
84 = 201E ; „
85 = 2026 ; …
86 = 2020 ; †
87 = 2021 ; ‡
88 = 2C6 ; ˆ
89 = 2030 ; ‰
8A = 160 ; Š
8B = 2039 ;
8C = 152 ; Œ
8D = 20 ;
8E = 17D ; Ž
8F = 20 ;
90 = 20 ;
91 = 2018 ;
92 = 2019 ;
93 = 201C ; “
94 = 201D ; ”
95 = 2022 ; •
96 = 2013 ;
97 = 2014 ; —
98 = 2DC ; ˜
99 = 2122 ; ™
9A = 161 ; š
9B = 203A ;
9C = 153 ; œ
9D = 20 ;
9E = 17E ; ž
9F = 178 ; Ÿ
A0 = A0 ;  
A1 = A1 ; ¡
A2 = A2 ; ¢
A3 = A3 ; £
A4 = A4 ; ¤
A5 = A5 ; ¥
A6 = A6 ; ¦
A7 = A7 ; §
A8 = A8 ; ¨
A9 = A9 ; ©
AA = AA ; ª
AB = AB ; «
AC = AC ; ¬
AD = AD ; ­
AE = AE ; ®
AF = AF ; ¯
B0 = B0 ; °
B1 = B1 ; ±
B2 = B2 ; ²
B3 = B3 ; ³
B4 = B4 ; ´
B5 = B5 ; µ
B6 = B6 ; ¶
B7 = B7 ; ·
B8 = B8 ; ¸
B9 = B9 ; ¹
BA = BA ; º
BB = BB ; »
BC = BC ; ¼
BD = BD ; ½
BE = BE ; ¾
BF = BF ; ¿
C0 = C0 ; À
C1 = C1 ; Á
C2 = C2 ; Â
C3 = C3 ; Ã
C4 = C4 ; Ä
C5 = C5 ; Å
C6 = C6 ; Æ
C7 = C7 ; Ç
C8 = C8 ; È
C9 = C9 ; É
CA = CA ; Ê
CB = CB ; Ë
CC = CC ; Ì
CD = CD ; Í
CE = CE ; Î
CF = CF ; Ï
D0 = D0 ; Ð
D1 = D1 ; Ñ
D2 = D2 ; Ò
D3 = D3 ; Ó
D4 = D4 ; Ô
D5 = D5 ; Õ
D6 = D6 ; Ö
D7 = D7 ; ×
D8 = D8 ; Ø
D9 = D9 ; Ù
DA = DA ; Ú
DB = DB ; Û
DC = DC ; Ü
DD = DD ; Ý
DE = DE ; Þ
DF = DF ; ß
E0 = E0 ; à
E1 = E1 ; á
E2 = E2 ; â
E3 = E3 ; ã
E4 = E4 ; ä
E5 = E5 ; å
E6 = E6 ; æ
E7 = E7 ; ç
E8 = E8 ; è
E9 = E9 ; é
EA = EA ; ê
EB = EB ; ë
EC = EC ; ì
ED = ED ; í
EE = EE ; î
EF = EF ; ï
F0 = F0 ; ð
F1 = F1 ; ñ
F2 = F2 ; ò
F3 = F3 ; ó
F4 = F4 ; ô
F5 = F5 ; õ
F6 = F6 ; ö
F7 = F7 ; ÷
F8 = F8 ; ø
F9 = F9 ; ù
FA = FA ; ú
FB = FB ; û
FC = FC ; ü
FD = FD ; ý
FE = FE ; þ
FF = FF ; ÿ

128
res/enc/cp437.ini Normal file
View File

@ -0,0 +1,128 @@
80 = C7 ; Ç
81 = FC ; ü
82 = E9 ; é
83 = E2 ; â
84 = E4 ; ä
85 = E0 ; à
86 = E5 ; å
87 = E7 ; ç
88 = EA ; ê
89 = EB ; ë
8A = E8 ; è
8B = EF ; ï
8C = EE ; î
8D = EC ; ì
8E = C4 ; Ä
8F = C5 ; Å
90 = C9 ; É
91 = E6 ; æ
92 = C6 ; Æ
93 = F4 ; ô
94 = F6 ; ö
95 = F2 ; ò
96 = FB ; û
97 = F9 ; ù
98 = FF ; ÿ
99 = D6 ; Ö
9A = DC ; Ü
9B = A2 ; ¢
9C = A3 ; £
9D = A5 ; ¥
9E = 20A7 ; ₧
9F = 192 ; ƒ
A0 = E1 ; á
A1 = ED ; í
A2 = F3 ; ó
A3 = FA ; ú
A4 = F1 ; ñ
A5 = D1 ; Ñ
A6 = AA ; ª
A7 = BA ; º
A8 = BF ; ¿
A9 = 2310 ; ⌐
AA = AC ; ¬
AB = BD ; ½
AC = BC ; ¼
AD = A1 ; ¡
AE = AB ; «
AF = BB ; »
B0 = 2591 ; ░
B1 = 2592 ; ▒
B2 = 2593 ; ▓
B3 = 2502 ; │
B4 = 2524 ; ┤
B5 = 2561 ; ╡
B6 = 2562 ; ╢
B7 = 2556 ; ╖
B8 = 2555 ; ╕
B9 = 2563 ; ╣
BA = 2551 ; ║
BB = 2557 ; ╗
BC = 255D ; ╝
BD = 255C ; ╜
BE = 255B ; ╛
BF = 2510 ; ┐
C0 = 2514 ; └
C1 = 2534 ; ┴
C2 = 252C ; ┬
C3 = 251C ; ├
C4 = 2500 ; ─
C5 = 253C ; ┼
C6 = 255E ; ╞
C7 = 255F ; ╟
C8 = 255A ; ╚
C9 = 2554 ; ╔
CA = 2569 ; ╩
CB = 2566 ; ╦
CC = 2560 ; ╠
CD = 2550 ; ═
CE = 256C ; ╬
CF = 2567 ; ╧
D0 = 2568 ; ╨
D1 = 2564 ; ╤
D2 = 2565 ; ╥
D3 = 2559 ; ╙
D4 = 2558 ; ╘
D5 = 2552 ; ╒
D6 = 2553 ; ╓
D7 = 256B ; ╫
D8 = 256A ; ╪
D9 = 2518 ; ┘
DA = 250C ; ┌
DB = 2588 ; █
DC = 2584 ; ▄
DD = 258C ; ▌
DE = 2590 ; ▐
DF = 2580 ; ▀
E0 = 3B1 ; α
E1 = DF ; ß
E2 = 393 ; Γ
E3 = 3C0 ; π
E4 = 3A3 ; Σ
E5 = 3C3 ; σ
E6 = B5 ; µ
E7 = 3C4 ; τ
E8 = 3A6 ; Φ
E9 = 398 ; Θ
EA = 3A9 ; Ω
EB = 3B4 ; δ
EC = 221E ; ∞
ED = 3C6 ; φ
EE = 3B5 ; ε
EF = 2229 ; ∩
F0 = 2261 ; ≡
F1 = B1 ; ±
F2 = 2265 ; ≥
F3 = 2264 ; ≤
F4 = 2320 ; ⌠
F5 = 2321 ; ⌡
F6 = F7 ; ÷
F7 = 2248 ; ≈
F8 = B0 ; °
F9 = 2219 ; ∙
FA = B7 ; ·
FB = 221A ; √
FC = 207F ; ⁿ
FD = B2 ; ²
FE = 25A0 ; ■
FF = A0 ;  

128
res/enc/cp866.ini Normal file
View File

@ -0,0 +1,128 @@
80 = 410 ; А
81 = 411 ; Б
82 = 412 ; В
83 = 413 ; Г
84 = 414 ; Д
85 = 415 ; Е
86 = 416 ; Ж
87 = 417 ; З
88 = 418 ; И
89 = 419 ; Й
8A = 41A ; К
8B = 41B ; Л
8C = 41C ; М
8D = 41D ; Н
8E = 41E ; О
8F = 41F ; П
90 = 420 ; Р
91 = 421 ; С
92 = 422 ; Т
93 = 423 ; У
94 = 424 ; Ф
95 = 425 ; Х
96 = 426 ; Ц
97 = 427 ; Ч
98 = 428 ; Ш
99 = 429 ; Щ
9A = 42A ; Ъ
9B = 42B ; Ы
9C = 42C ; Ь
9D = 42D ; Э
9E = 42E ; Ю
9F = 42F ; Я
A0 = 430 ; а
A1 = 431 ; б
A2 = 432 ; в
A3 = 433 ; г
A4 = 434 ; д
A5 = 435 ; е
A6 = 436 ; ж
A7 = 437 ; з
A8 = 438 ; и
A9 = 439 ; й
AA = 43A ; к
AB = 43B ; л
AC = 43C ; м
AD = 43D ; н
AE = 43E ; о
AF = 43F ; п
B0 = 2591 ; ░
B1 = 2592 ; ▒
B2 = 2593 ; ▓
B3 = 2502 ; │
B4 = 2524 ; ┤
B5 = 2561 ; ╡
B6 = 2562 ; ╢
B7 = 2556 ; ╖
B8 = 2555 ; ╕
B9 = 2563 ; ╣
BA = 2551 ; ║
BB = 2557 ; ╗
BC = 255D ; ╝
BD = 255C ; ╜
BE = 255B ; ╛
BF = 2510 ; ┐
C0 = 2514 ; └
C1 = 2534 ; ┴
C2 = 252C ; ┬
C3 = 251C ; ├
C4 = 2500 ; ─
C5 = 253C ; ┼
C6 = 255E ; ╞
C7 = 255F ; ╟
C8 = 255A ; ╚
C9 = 2554 ; ╔
CA = 2569 ; ╩
CB = 2566 ; ╦
CC = 2560 ; ╠
CD = 2550 ; ═
CE = 256C ; ╬
CF = 2567 ; ╧
D0 = 2568 ; ╨
D1 = 2564 ; ╤
D2 = 2565 ; ╥
D3 = 2559 ; ╙
D4 = 2558 ; ╘
D5 = 2552 ; ╒
D6 = 2553 ; ╓
D7 = 256B ; ╫
D8 = 256A ; ╪
D9 = 2518 ; ┘
DA = 250C ; ┌
DB = 2588 ; █
DC = 2584 ; ▄
DD = 258C ; ▌
DE = 2590 ; ▐
DF = 2580 ; ▀
E0 = 440 ; р
E1 = 441 ; с
E2 = 442 ; т
E3 = 443 ; у
E4 = 444 ; ф
E5 = 445 ; х
E6 = 446 ; ц
E7 = 447 ; ч
E8 = 448 ; ш
E9 = 449 ; щ
EA = 44A ; ъ
EB = 44B ; ы
EC = 44C ; ь
ED = 44D ; э
EE = 44E ; ю
EF = 44F ; я
F0 = 401 ; Ё
F1 = 451 ; ё
F2 = 404 ; Є
F3 = 454 ; є
F4 = 407 ; Ї
F5 = 457 ; ї
F6 = 40E ; Ў
F7 = 45E ; ў
F8 = B0 ; °
F9 = 2219 ; ∙
FA = B7 ; ·
FB = 221A ; √
FC = 2216 ;
FD = A4 ; ¤
FE = 25A0 ; ■
FF = A0 ;  

20
res/enc/enc.ini Normal file
View File

@ -0,0 +1,20 @@
; Unicode encodings are hard-coded,
; they are assigned with following indices:
; Unicode UTF-8 -1
; Unicode UTF-16 (Network Order) -2
; Unicode UTF-16 (Little Endian) -3
; One-byte encodings are listed below:
Windows Latin = cp1252 ; 0
Windows Cyrillic = cp1251 ; 1
DOS Latin = cp437 ; 2
DOS Cyrillic = cp866 ; 3
KOI-8 Russian = koi8r ; 4
; Internal resource encoding,
; encoding of files' names inside archives
DEFAULT = 1
ARCHIVE = 3 ; -1?

128
res/enc/koi8r.ini Normal file
View File

@ -0,0 +1,128 @@
80 = 2500 ; ─
81 = 2502 ; │
82 = 250C ; ┌
83 = 2510 ; ┐
84 = 2514 ; └
85 = 2518 ; ┘
86 = 251C ; ├
87 = 2524 ; ┤
88 = 252C ; ┬
89 = 2534 ; ┴
8A = 253C ; ┼
8B = 2580 ; ▀
8C = 2584 ; ▄
8D = 2588 ; █
8E = 258C ; ▌
8F = 2590 ; ▐
90 = 2591 ; ░
91 = 2592 ; ▒
92 = 2593 ; ▓
93 = 2320 ; ⌠
94 = 25A0 ; ■
95 = 2219 ; ∙
96 = 221A ; √
97 = 2248 ; ≈
98 = 2264 ; ≤
99 = 2265 ; ≥
9A = A0 ;  
9B = 2321 ; ⌡
9C = B0 ; °
9D = B2 ; ²
9E = B7 ; ·
9F = F7 ; ÷
A0 = 2550 ; ═
A1 = 2551 ; ║
A2 = 2552 ; ╒
A3 = 451 ; ё
A4 = 2553 ; ╓
A5 = 2554 ; ╔
A6 = 2555 ; ╕
A7 = 2556 ; ╖
A8 = 2557 ; ╗
A9 = 2558 ; ╘
AA = 2559 ; ╙
AB = 255A ; ╚
AC = 255B ; ╛
AD = 255C ; ╜
AE = 255D ; ╝
AF = 255E ; ╞
B0 = 255F ; ╟
B1 = 2560 ; ╠
B2 = 2561 ; ╡
B3 = 401 ; Ё
B4 = 2562 ; ╢
B5 = 2563 ; ╣
B6 = 2564 ; ╤
B7 = 2565 ; ╥
B8 = 2566 ; ╦
B9 = 2567 ; ╧
BA = 2568 ; ╨
BB = 2569 ; ╩
BC = 256A ; ╪
BD = 256B ; ╫
BE = 256C ; ╬
BF = A9 ; ©
C0 = 44E ; ю
C1 = 430 ; а
C2 = 431 ; б
C3 = 446 ; ц
C4 = 434 ; д
C5 = 435 ; е
C6 = 444 ; ф
C7 = 433 ; г
C8 = 445 ; х
C9 = 438 ; и
CA = 439 ; й
CB = 43A ; к
CC = 43B ; л
CD = 43C ; м
CE = 43D ; н
CF = 43E ; о
D0 = 43F ; п
D1 = 44F ; я
D2 = 440 ; р
D3 = 441 ; с
D4 = 442 ; т
D5 = 443 ; у
D6 = 436 ; ж
D7 = 432 ; в
D8 = 44C ; ь
D9 = 44B ; ы
DA = 437 ; з
DB = 448 ; ш
DC = 44D ; э
DD = 449 ; щ
DE = 447 ; ч
DF = 44A ; ъ
E0 = 42E ; Ю
E1 = 410 ; А
E2 = 411 ; Б
E3 = 426 ; Ц
E4 = 414 ; Д
E5 = 415 ; Е
E6 = 424 ; Ф
E7 = 413 ; Г
E8 = 425 ; Х
E9 = 418 ; И
EA = 419 ; Й
EB = 41A ; К
EC = 41B ; Л
ED = 41C ; М
EE = 41D ; Н
EF = 41E ; О
F0 = 41F ; П
F1 = 42F ; Я
F2 = 420 ; Р
F3 = 421 ; С
F4 = 422 ; Т
F5 = 423 ; У
F6 = 416 ; Ж
F7 = 412 ; В
F8 = 42C ; Ь
F9 = 42B ; Ы
FA = 417 ; З
FB = 428 ; Ш
FC = 42D ; Э
FD = 429 ; Щ
FE = 427 ; Ч
FF = 42A ; Ъ

BIN
res/img/Thumbs.db Normal file

Binary file not shown.

BIN
res/img/about.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

BIN
res/img/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

38
res/img/icons.ini Normal file
View File

@ -0,0 +1,38 @@
; The syntax is the same as in modules.ini:
; icon_file.ext [@ x, y, width, height]]
; Comments like iFile or iCrypt are optional and placed here just to make this file easier for human reading and editing.
0 = icons.png @ 0, 0, 16, 16 ; iFile
1 = icons.png @ 112, 0, 16, 16 ; iFolder
2 = icons.png @ 128, 0, 16, 16 ; iHiddenFolder
3 = icons.png @ 144, 0, 16, 16 ; iDisk
4 = icons.png @ 176, 0, 16, 16 ; iFavorites
5 = icons.png @ 192, 0, 16, 16 ; iUp
6 = icons.png @ 208, 0, 16, 16 ; iClipboard
7 = icons.png @ 224, 0, 16, 16 ; iSieFM
8 = icons.png @ 240, 0, 16, 16 ; iCopy
9 = icons.png @ 256, 0, 16, 16 ; iMove
10 = icons.png @ 272, 0, 16, 16 ; iPaste
11 = icons.png @ 288, 0, 16, 16 ; iProperties
12 = icons.png @ 304, 0, 16, 16 ; iOptions
13 = icons.png @ 320, 0, 16, 16 ; iRename
14 = icons.png @ 336, 0, 16, 16 ; iHelp
15 = icons.png @ 352, 0, 16, 16 ; iDelete
17 = icons.png @ 384, 0, 16, 16 ; iNext
18 = icons.png @ 400, 0, 16, 16 ; iUnpack
19 = icons.png @ 416, 0, 16, 16 ; iMark
20 = icons.png @ 432, 0, 16, 16 ; iMarkAll
21 = icons.png @ 448, 0, 16, 16 ; iDemarkAll
22 = icons.png @ 464, 0, 16, 16 ; iNoMute
23 = icons.png @ 480, 0, 16, 16 ; iMute
24 = icons.png @ 496, 0, 16, 16 ; iSelect
25 = icons.png @ 512, 0, 16, 16 ; iMoveIt
26 = icons.png @ 528, 0, 16, 16 ; iPack
27 = icons.png @ 544, 0, 16, 16 ; iKey
28 = icons.png @ 560, 0, 16, 16 ; iMenu
31 = icons_new.png @ 0, 0, 16, 16 ; iCrypt
16 = icons_new.png @ 16, 0, 16, 16 ; iExit
30 = icons_new.png @ 32, 0, 16, 16 ; iMinimize
29 = icons_new.png @ 48, 0, 16, 16 ; iSearch

BIN
res/img/icons.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

BIN
res/img/icons_new.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 993 B

34
res/img/layout.ini Normal file
View File

@ -0,0 +1,34 @@
; This file is a replacement for obsolete layout.dat
[Colors]
cPlayTitle = FFFFFFFF
cPlayFore1 = FF800000
cPlayFore2 = FF000080
cImgBack = FF000000
cVisArrowCap = FF000080
cVisArrowLine = FFEFEFFF
cVisBack1 = FFD0D0E0
cVisBack2 = FFB0B0C0
[Positions]
iconWidth = 16
iconHeight = 16
uiTopHeight = 20
uiBottomHeight = 28
uiTopHSpace = 6
uiTopVSpace = 0
uiBottomHOffset = 7
uiBottomVOffset = 2
uiBottomVSpace = 0
btnX = 28
btnY = 22
btnWidth = 23
btnHeight = 23
playAnimWidth = 101
playAnimHeight = 36
playAnimFrames = 4
waitAnimWidth = 32
waitAnimHeight = 32
waitAnimFrames = 4

BIN
res/img/mb_critical.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
res/img/mb_exclamation.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
res/img/mb_information.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
res/img/mb_question.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
res/img/player_bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
res/img/player_ui.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

1
res/img/splash.txt Normal file
View File

@ -0,0 +1 @@
Somebody please create new splash.png image...

BIN
res/img/wait.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 B

60
res/lang/ReadMe.txt Normal file
View File

@ -0,0 +1,60 @@
Here we store translated text and strings used in program.
Each translation is stored in separate subfolder, which name should (yet doesn't have to) be a two-letter language code. Following this rule will enable that language to be auto-detected on first program run.
Each language subfolder must contain following files:
1. strings.ini - an ini-formatted file containing numeric string identifiers and strings assigned to them.
2. about.txt - some sort of description of the program, possibly containing some help info.
3. license.txt - no comments.
Additionally there may be file named offsets.ini - an ini-formatted file containing class names and string table offset values assigned for those classes.
Next, in order for the program to see those translations, there is a file lang.ini. It maps two-letter language codes with human-readable language names.
All files listed above may be saved either in Unicode UTF-8 or UTF-16 (both big endian and little endian) text encodings with BOM signature, or in one-byte encoding for which there is a codepage and which is marked as default (see ReadMe.txt in enc folder).
Files about.txt and license.txt are simple text files, just like this one, and require no special discussion. But the other two do.
Here is the most complicated strings.ini file example possible:
;--------------------------------------------------------------
[0] ; offset of zero - no offset for strings below
0 = Zero string ; tabs are used
1 = First string ; spaces
2=Second string ; no spaces at all
-1 = String one ; negative identifiers are allowed
-2 = String two
100 = File %A in folder %B is %C, whih caused an error %D ; This string contains placeholders for runtime substitution. And some parts of this program expect some strings to contain such placeholders in order to display something really usefull, e.g. "File some_filename.txt is read-only!" instead of "File is read-only!".
101 = Operation %B failed: %A ; Another example of placeholders. As you can see, they do not have to follow in alphabetical order at all. More even, you can relatively painless omit some or even all. As the payback the program will become less informative.
102 = This is \n multiline \n\n string, \t containing \t tabs, slashes \\, \\ and \\\\, octal symbols \007 \000 \015 \177, and unicode symbols \u263A \u263C \u00B0 ; This string contains escaped characters. When strings are loaded into runtime string table, they are unescaped, so it is possible to have multiline strings in string table and some specific characters in strings. Just don't forget to replace every \ with \\.
; Those strings above will be stored in runtime string table with indices 0, 1 and 2, just as the are.
; But ones below will be stored with indices 1001, 1002, 1010, 1041.
; This offset stuff is introduced to enable convinient movement of string blocks along the table. Why wold someone bother to do so is discussed further in this document.
[1000] ; offset of 1000 for strings below
1 = Alpha
2 = Beta
10 = Gamma
41 = Delta
;--------------------------------------------------------------
And the same for offsets.ini file:
;--------------------------------------------------------------
filemanager.cvsFileSelect = 0 ; redundant thing, we could have just skipped this line with the same result
filemanager.cvsTextView = 1000 ; now if something in class cvsTextView asks the Locale class for string identified by number 15, it will return string identified by number 1015
filemanager.cvsImageView = -1000 ; same here, except that instead of string #15 string #-985 will be returned.
;--------------------------------------------------------------
Offsets are introduced to resolve string identifier conflicts. Imagine that someone developed a module and used string identifiers from 250 to 300, and another someone developed another module with string identifiers from 275 to 315. Obviously we can't put both string sets into one string table, because they overlap. So we assign an offset of, say, 1000 to all classes (if there are more than one) of one module in offsets.ini and place those strings in strings.ini under offset [1000]. Now, for example, first module is still using strings form 250 to 300, and second module is using strings from 1275 to 1315, without overlapping.

44
res/lang/en/about.txt Normal file
View File

@ -0,0 +1,44 @@
UniFM stands for the "Unified File Manager" for mobile phones which support file system access from Java. It allows to view, copy, move and delete files and folders in your phone.
The key feature of UniFM in comparison with other file managers is modular structure. That is, users can define what functionality do they need, and select components which will be included into the program according to their requirements. The minimum set - only the file kernel performing basic operations with files and folders. The maximum configuration is limited by nothing (only by phone resources, actually). For instance, this version includes a standard "gentleman's set" of modules for viewing pictures and videos, music playback and text editing.
The unique system of interoperation with archives is implemented in UniFM, also on a modular basis. It means that theoretically support for any types of archives can be added into the program, and for users those will look the same way as ordinary folders in the file system do. In is possible to perform usual copyings, movings, renamings and removals of files within archives, viewing and editing of texts, music playback and etc. Besides, nested archives are supported. Possibilities, again, are limited only by phone resources.
Technically UniFM is the further development of SieFM (Siemens File Manager) project and hence inherits many of its' features. The main functions of the program are listed below:
There is a possibility of deleting read-only files, viewing of hidden folders, recursive removal of folders. The program has the multiwindow interface - up to 10 windows between which it is possible to switch. File viewers are launched in the same windows, so that it is possible to start a player in one window, switch to another and carry on.
The image viewing module supports all graphics formats recognised by phone, and viewing of vector animations in MVI format (file format of program VIArt) is supported. Similarly, the audioplayer except playback of the files which are played back by certain phone, supports playback of music in tracker formats MOD (ProTracker), XM (FastTracker 2) and S3M (ScreamTracker).
Text viewing and editing is possible in Unicode encoding in formats UTF-8 and UTF-16, and also in all most often used one-byte encodings (CP1251, CP866, KOI-8). Text is shown from the position on which it was quitted last time, quick transition to any position and resizing of font are possible. The text editor supports undoing of changes brought in the text, search and replacement of fragments of the text, conversion of texts from one encoding in another.
Types of files supported by this version:
Images: .jpg .jpe .gif .png .bmx .jpeg .wbmp .ico .bmp
Audio: .mid .amr .wav .aac .mp3 .imy .m4a .xmf .awb .midi .wma + .xm .mod .s3m
Video: .3gp .mp4 .m4v .wmv .rm
Text: .j .txt .jad .log .ini .inf .cdf .xml .col .java .jcc + .tmo .vcs .vnt
Archives: .zip .jar .sdt .scs .nth + .gz .gzip + .pak .res
Here are listed extensions of all file types for which appropriate icons are displayed. Nevertheless, ability of the program to handle some file type is determined by a set of the modules contained in it.
You can always download the latest version of the midlet from site http://projectd8.narod.ru, in section of Java Programs.
Also look for midlet discussion at Siemens-club forums (http://forum.siemens-club.org, http://forum.s-c.ru) and SEclub's(http://seclub.org/forum/index.php).
P.S. Thanks to all for responses and testing SieFM and UniFM! Send wishes on projectd8@yandex.ru.
© SilentKnight 2008+, VMX 2006, DiHLoS 2005
Thanks are expressed to:
* GNU Project - for library for working with ZIP as a part of GNU Classpath
* Edmund Wagner (innoSysTec GmbH) - for library for unpacking RAR
* Apache Jakarta Project - for library for working with reqular expressions
* Martin Cameron - for IBXM library for tracker music playback
* Sergey Bochkanov (ALGLIB project) - for bicubic interpolation library
* aNNiMON - for visualisation in the player (the second and third modes) and accelerometer-based controls
* DOMr - got FileManager x65 sources from DiHLoS %)
* Spider13 - started Vista style idea
* SkyFor - for new UI icons
...and also to all developers who took part in modules writing.

27
res/lang/en/colors.ini Normal file
View File

@ -0,0 +1,27 @@
Fore = Text
AltFore = Clock
HLFore = Mark
LTBorder = Element border
MDBorder = Border in file list
DKBorder = Border around menu
Disabled = Inactive menu item
Back1 = Background, top color
Back2 = Background, bottom color
SelFore = Selected text
SelBack1 = Selection, left color
SelBack2 = Selection, right color
MnFore = Menu text
MnAltFore = Menu item numbers
MnBack1 = Menu background, top color
MnBack2 = Menu background, bottom color
MnSelFore = Selected menu text
MnSelBack1 = Menu selection, left color
MnSelBack2 = Menu selection, right color
SKFore = Text on soft buttons
SKSelFore = Selected text on soft buttons
SKSelBack1 = Selected soft button, edge color
SKSelBack2 = Selected soft button, center color
Drap = Screen drapery
SBLine = Scrollbar
SBFore = Scrollbar slider

7
res/lang/en/license.txt Normal file
View File

@ -0,0 +1,7 @@
Midlet is distributed by principle AS IS.
You may CRASH your mobile phone if you don't know what you do.
No claim amitted.
Do you accept this terms?

20
res/lang/en/offsets.ini Normal file
View File

@ -0,0 +1,20 @@
; class.package.ClassName = <offset_value>
; If you plan to obfuscate your module, don't forget to tell your obfuscator to adapt the contents of this file.
; For ProGuard it is done like that: -adaptresourcefilecontents lang/**
modules.langpack.StringUnpacker = 1000
modules.langpack.StringPacker = 1000
modules.FileSplicer = 2000
modules.FileSplitter = 2000
modules.mascot.MascotViewer = 3000
modules.mascot.AnimationViewer = 3000
modules.mascot.TextureLoader = 3000
modules.mascot.Lib_mcv3 = 3000
modules.FishlabsUncoder = 3500
modules.mocha.Decompiler = 3500
modules.SWFViewer = 3500
modules.HideFile = 3500

365
res/lang/en/strings.ini Normal file
View File

@ -0,0 +1,365 @@
0 = Select disk:
1 = Favourites
2 = Options
3 = Exit
4 = Disk
5 = Disk information
6 = Total size:
7 = Kb
8 = bytes
9 = Available:
10 = Select
11 = Delete
12 = Delete all
13 = Back
14 = File name must not contain any of the following characters: %A
15 = Confirmation
16 = Delete entry from Favourites?
17 = Delete all entries from Favourites?
18 = Yes
19 = No
20 = Save
21 = Clear
22 = Error!
23 = File %A already exist!
24 = File %A not copied: %B\n\n
25 = File %A not moved: %B\n\n
26 = This file format is not supported!
27 = Open
28 = Paste
29 = Properties
30 = Rename
31 = Copy
32 = Move
33 = Folder...
34 = File...
35 = Add to Favourites
36 = Disk info
37 = Escaped strings
38 = Preferences
39 = Help
40 = OK
41 = Cancel
42 = Added to Clipboard
43 = Information:
44 = Folder name:
45 = File name:
46 = Size:
47 = Attributes:
48 = Last modified:
49 = Rename
50 = Name:
51 = File(folder) with this name already exist! Select another name.
52 = File %A is read only!
53 = Not renamed!
54 = Show hidden files and folders
55 = Visual effects
56 = Browse options:
57 = Extended menu
58 = Rotate by %A°
59 = Show error messages
60 = Create folder
61 = Create file
62 = Folder not created!
63 = Please wait...
64 = Wait
65 = In current folder
66 = On current disk
67 = On all disks
68 = scaled
69 = Attention!
70 = File %A copied. Source file is read-only.\n\n
71 = Delete selected file (folder)?
72 = Delete marked files?
73 = Folder deleted!
74 = Folder not empty. Delete recursively?
75 = File deleted.
76 = File %A not deleted!
77 = License agreement
78 = File type:
79 = File not saved! Exit?
80 = File saved
81 = Clipboard
82 = %A - copy
83 = %A - copy (%B)
84 = Operation complete successfully.
85 = File
86 = File not saved! Check 'Read Only' attribute.
87 = Gb
88 = Mark
89 = Mark all
90 = Unmark all
91 = Open not supported files as text
92 = Sort list
93 = Screen rotation
94 = Restart will be required for the new settings to take effect.
95 = Extract...
96 = Extract all...
97 = Extract to:
98 = Folder does not exist and cannot be created!
99 = Files extracted successfully.
100 = Yes for all
101 = No for all
102 = Vibration on key press, ms
103 = Compressed:
104 = File
105 = Archive
106 = Properties
107 = Operations
108 = Create
109 = Interface
110 = Minimize visual effects
111 = Archive...
112 = Compression level
113 = ID3v1 editor
114 = Title
115 = Artist
116 = Album
117 = Year
118 = Comment
119 = Track no
120 = Genre
121 = Mb
122 = Joy Left
123 = Joy Right
124 = Joy Up
125 = Joy Down
126 = Left softkey
127 = Right softkey
128 = Joy press
129 = Dial
130 = NoDial
131 = Prev screen
132 = Next screen
133 = Prev file
134 = Next file
135 = Hot keys
136 = Additional
137 = Panels
138 = Panel 1
139 = Panel 2
140 = Panel 3
141 = Panel 4
142 = Panel 5
143 = Panel 6
144 = Panel 7
145 = Panel 8
146 = Panel 9
147 = Panel 10
148 = Fullscreen
149 = no action
150 = Keyboard...
151 = Language
152 = Color scheme
153 = Check file attributes
154 = Accurate directory check
155 = Sort file list
156 = Read only
157 = Hidden
158 = Contents
159 = %A folders, %B files
160 = Player options
161 = ID3 encoding
162 = Show play progress
163 = Tracker module buffer size, sec.
164 = Done
165 = Text editor options
166 = Show CR symbol
167 = Show LF symbol
168 = Substitute tabulation with spaces
169 = Go to
170 = Scroll by pages instead of lines
171 = Key mapping
172 = Initial setup
173 = Clock mode
174 = Switch
175 = Next panel
176 = Prev. panel
177 = Next free
178 = Prev. free
179 = Swap panels
180 = Edit
181 = Search
182 = Font
183 = Encoding
184 = Recursive search
185 = Hash-sum
186 = Crypt
187 = Password
188 = Use crypt operation again with the same password for decryption.
189 = Small
190 = Medium
191 = Large
192 = Face
193 = Style
194 = Bold
195 = Italic
196 = Monospace
197 = Proportional
198 = System
199 = Underlined
200 = Show menu numbers
201 = Shuffle playback
202 = Transcode
203 = Custom
204 = Playlist
205 = Search inside archives
206 = Audio
207 = Video
208 = Save path
209 = Absolute
210 = Relative
211 = ZIP archiver
212 = PPK archiver
213 = Audioplayer
214 = Image viewer
215 = Videoplayer
216 = Text editor
217 = Note editor
218 = Tracker player
219 = Color scheme installer
220 = Vector image viewer
221 = Frame cursor
222 = No change
223 = Set
224 = Reset
225 = Background image
226 = Name template
227 = Minimize
228 = Save changes?
229 = Save as...
230 = Edit
231 = Undo
232 = Redo
233 = Find
234 = Find next
235 = Text
236 = Archive encoding
237 = Line number
238 = Remember explored paths
239 = Templates
240 = Use UTF BOM signature
241 = File end is reached. Continue search from the beginning?
242 = To start
243 = To end
244 = Add
245 = Play message signals
246 = Swap soft keys in menus
247 = Ignore case
248 = Don't sort
249 = By name
250 = By type
251 = By date
252 = By size
253 = Sort options
254 = Reverse order
255 = Restart
256 = Move cursor on mark
257 = Replace
258 = Replace all
259 = Replace with
260 = Alter clock position
261 = matches
262 = Equalizer
263 = Hz
264 = KHz
265 = dB
266 = Use accelerometer
267 = Backlight always on
268 = Tracker module sample rate
269 = Tracker module resample quality
270 = Low
271 = Medium
272 = High
273 = Disabled
274 = Enabled
275 = Automatic
276 = Escape
277 = Unescape
278 = Clipboard is empty!
279 = Modules
280 = Packing file %A...
281 = Playlist
282 = Stub
283 = Character
284 = Text box title
285 = Normal
286 = Ticker tape
287 = ZIP archive
288 = PPK archive
289 = Unpacking file %A...
290 = Memory monitor
291 = Update
292 = Fill
293 = Used
294 = Total
295 = Memory monitor step, ms
296 = Garbage collector threshold, %
297 = Containers
298 = Close
299 = Close all
300 = Writing file %A...
301 = Palette
302 = Color selector
303 = %A refer., %B depend.
304 = Long item scroll speed
305 = Installing color scheme...
306 = Refined gradients
307 = Transparency in gradients
308 = Text buffer size, char.
309 = Full file names
310 = In Clipboard
311 = In Favourites
312 = Enter
313 = Key assignment
314 = User-defined keys
315 = Key editor
316 = Key code
317 = Device internal handler
318 = Abbreviation
319 = Press a key...
320 = Hot %A
321 = Held %A
322 = Root
323 = File list
324 = Bit bucket
325 = RAR archiver
326 = Assign
327 = Reset
328 = Cache code pages
329 = Large font
330 = In file list
331 = In menu
332 = "Exit" in drive list
333 = Metadata format
334 = Show metadata captions
335 = Regular expressions
336 = Multiline matching
337 = Replace backreferences
[1000]
0 = Lang pack decompiler
1 = Lang pack compiler
[2000]
0 = File splice
1 = File splitter
2 = Parts count
3 = Part size
4 = File size unknown, split impossible.
[3000]
0 = MascotCapsule model viewer
1 = MascotCapsule animation viewer
2 = MascotCapsule texture loader
3 = S %A Rx %D° Ry %E° Px %G Py %H F %J
[3500]
0 = FishlabsUncoder
1 = JavaDecompiler
2 = Flash (swf) Viewer
3 = Hide File

2
res/lang/lang.ini Normal file
View File

@ -0,0 +1,2 @@
ru = Ðóññêèé
en = English

44
res/lang/ru/about.txt Normal file
View File

@ -0,0 +1,44 @@
UniFM (Unified File Manager) - унифицированный файловый менеджер для телефонов с поддержкой доступа к файловой системе из Java. Он позволяет просматривать, копировать, перемещать и удалять файлы и папки в Вашем телефоне.
Главная особенность UniFM по сравнению с другими файловыми менеджерами - модульная структура. То есть, пользователи могут сами определять, какая функциональность им требуется, и в соответствии со своими потребностями выбирать компоненты, которые войдут в состав программы. Минимальный набор - только файловое ядро, выполняющее базовые операции над файлами и папками. Максимальная же конфигурация не ограничена ничем (фактически - только ресурсами телефона). Например, данная версия включает в себя стандартный "джентельменский набор" модулей для просмотра картинок и видео, прослушивания музыки и редактирования текста.
В UniFM реализована уникальная система прозрачного взаимодействия с архивами, также на модульной основе. Это означает, что в программу теоретически может быть добавлена поддержка любых типов архивов, причем для пользователя они будут неотличимы от обычных папок в файловой системе. Внутри архивов можно выполнять привычные операции копирования, перемещения, переименования и удаления файлов, просматривать и редактировать тексты, воспроизводить музыку и т.д. Кроме того, поддерживаются вложенные архивы. Возможности, опять-таки, ограничены только ресурсами телефона.
Технически UniFM является развитием проекта SieFM (Siemens File Manager), и поэтому наследует многие его черты. Ниже перечислены основные возможности программы:
Имеется возможность удаления файлов read-only (только для чтения), просмотра скрытых папок, рекурсивного удаления папок. Программа имеет многооконный интерфейс - до 10 окон, между которыми можно переключаться. Средства просмотра файлов запускаются в тех же самых окнах, то есть можно запустить проигрыватель в одном окне, переключиться на другое и продолжить работу.
Модуль просмотра изображений поддерживает все графические форматы, которые распознаются самим телефоном, кроме того, поддерживается просмотр векторной анимации в формате MVI (формат программы VIArt). Аналогично, аудиопроигрыватель кроме воспроизведения файлов, воспроизводимых данным телефоном, поддерживает воспроизведение музыки в трекерных форматах MOD (ProTracker), XM (FastTracker 2) и S3M (ScreamTracker).
Просмотр и редактирование текста возможно в кодировке Unicode в форматах UTF-8 и UTF-16, а также во всех наиболее часто используемых однобайтовых кодировках (CP1251, CP866, KOI-8). Просмотр текста начинается с той позиции, на которой он был в прошлый раз завершен, возможен быстрый переход на произвольную позицию, изменение размера шрифта. Текстовый редактор поддерживает отмену вносимых в текст изменений, поиск и замену фрагментов текста, преобразование текстов из одной кодировки в другую.
Поддерживаемые данной версией типы файлов:
Графические: .jpg .jpe .gif .png .bmx .jpeg .wbmp .ico .bmp
Музыкальные: .mid .amr .wav .aac .mp3 .imy .m4a .xmf .awb .midi .wma + .xm .mod .s3m
Видео: .3gp .mp4 .m4v .wmv .rm
Текстовые: .j .txt .jad .log .ini .inf .cdf .xml .col .java .jcc + .tmo .vcs .vnt
Архивы: .zip .jar .sdt .scs .nth + .gz .gzip + .pak .res
В списке приведены расширения файлов, для которых отображаются соответствующие значки. Тем не менее, способность программы обрабатывать тот или иной тип файлов определяется набором модулей, содержащихся в ней.
Последнюю версию мидлета вы всегда можете скачать с сайта http://projectd8.narod.ru, в разделе Программы Java.
Также смотрите обсуждение мидлета на форумах Сименс-Клуба (http://forum.siemens-club.org, http://forum.s-c.ru) и SEclub'а (http://seclub.org/forum/index.php).
P.S. Спасибо всем за отзывы и тестирование SieFM и UniFM! Шлите пожелания на projectd8@yandex.ru.
© SilentKnight 2008+, VMX 2006, DiHLoS 2005
Благодарности выражаются:
* GNU Project - за библиотеку для работы с ZIP в составе GNU Classpath
* Edmund Wagner (innoSysTec GmbH) - за библиотеку для распаковки RAR
* Apache Jakarta Project - за библиотеку для работы с регулярными выражениями
* Martin Cameron - за библиотеку IBXM для воспроизведения трекерной музыки
* Sergey Bochkanov (ALGLIB project) - за библиотеку бикубической интерполяции
* aNNiMON - за визуализацию в плеере (второй и третий режимы) и управление с помощью акселерометра
* DOMr - договорился с DiHLoS-ом о сорцах
* Spider13 - стартанул интерфейс в стиле Vista
* SkyFor - за новые значки интерфейса
...а также всем разработчикам, принявшим участие в написании модулей.

27
res/lang/ru/colors.ini Normal file
View File

@ -0,0 +1,27 @@
Fore = Текст
AltFore = Часы
HLFore = Отметка
LTBorder = Рамка элементов
MDBorder = Рамка в списке файлов
DKBorder = Рамка вокруг меню
Disabled = Неактивный пункт меню
Back1 = Фон, цвет сверху
Back2 = Фон, цвет снизу
SelFore = Выделенный текст
SelBack1 = Выделение, цвет слева
SelBack2 = Выделение, цвет справа
MnFore = Текст меню
MnAltFore = Номера пунктов меню
MnBack1 = Фон меню, цвет сверху
MnBack2 = Фон меню, цвет снизу
MnSelFore = Выделенный текст меню
MnSelBack1 = Выделение в меню, цвет слева
MnSelBack2 = Выделение в меню, цвет справа
SKFore = Текст на софт-кнопках
SKSelFore = Выделенный текст на софт-кнопках
SKSelBack1 = Выделенная софт-кнопка, цвет с краю
SKSelBack2 = Выделенная софт-кнопка, цвет в центре
Drap = Драпировка экрана
SBLine = Полоса прокрутки
SBFore = Ползунок полосы прокрутки

6
res/lang/ru/license.txt Normal file
View File

@ -0,0 +1,6 @@
Мидлет поставляется по принципу AS IS (как есть).
При неумелом обращении с мидлетом вы можете НАВРЕДИТЬ своему мобильному телефону.
За принесенный моральный и материальный ущерб автор мидлета ответственности НЕ несет.
Вы согласны с условиями данного соглашения?

20
res/lang/ru/offsets.ini Normal file
View File

@ -0,0 +1,20 @@
; class.package.ClassName = <offset_value>
; If you plan to obfuscate your module, don't forget to tell your obfuscator to adapt the contents of this file.
; For ProGuard it is done like that: -adaptresourcefilecontents lang/**
modules.langpack.StringUnpacker = 1000
modules.langpack.StringPacker = 1000
modules.FileSplicer = 2000
modules.FileSplitter = 2000
modules.mascot.MascotViewer = 3000
modules.mascot.AnimationViewer = 3000
modules.mascot.TextureLoader = 3000
modules.mascot.Lib_mcv3 = 3000
modules.FishlabsUncoder = 3500
modules.mocha.Decompiler = 3500
modules.SWFViewer = 3500
modules.HideFile = 3500

365
res/lang/ru/strings.ini Normal file
View File

@ -0,0 +1,365 @@
0 = Выбор диска:
1 = Избранное
2 = Опции
3 = Выход
4 = Диск
5 = Информация о диске
6 = Общий размер:
7 = Кб
8 = байт
9 = Свободно:
10 = Выбор
11 = Удалить
12 = Удалить все
13 = Назад
14 = Имя файла не должно содержать следующих символов: %A
15 = Подтверждение
16 = Удалить запись из Избранного?
17 = Удалить все из Избранного?
18 = Да
19 = Нет
20 = Сохранить
21 = Очистить
22 = Ошибка!
23 = Файл %A уже существует. Перезаписать?
24 = Файл %A не скопирован: %B\n\n
25 = Файл %A не перемещен: %B\n\n
26 = Данный формат файла не поддерживается!
27 = Открыть
28 = Вставить
29 = Свойства
30 = Переименовать
31 = Копировать
32 = Переместить
33 = Папку...
34 = Файл...
35 = В избранное
36 = Инфо о диске
37 = Экранированные строки
38 = Настройки
39 = Помощь
40 = ОК
41 = Отмена
42 = Добавлен(ы) в буфер обмена
43 = Информация
44 = Имя папки
45 = Имя файла
46 = Размер
47 = Атрибуты
48 = Последнее изменение
49 = Переименовать
50 = Имя:
51 = Этот файл (папка) уже существует, выберите другое имя.
52 = Файл %A только для чтения!
53 = Не переименован!
54 = Показывать скрытые файлы и папки
55 = Визуальные эффекты
56 = Просмотр и выполнение
57 = Расширенное меню
58 = Повернуть на %A°
59 = Показывать сообщения об ошибках
60 = Создать папку
61 = Создать файл
62 = Папка не создана!
63 = Пожалуйста, подождите...
64 = Подождите
65 = В текущей папке
66 = На текущем диске
67 = На всех дисках
68 = масш.
69 = Внимание!
70 = Файл %A скопирован, исходный файл только для чтения.\n\n
71 = Удалить выбранный файл (папку)?
72 = Удалить отмеченные файлы?
73 = Папка удалена!
74 = Папка не пуста. Удалить рекурсивно?
75 = Файл удален.
76 = Невозможно удалить файл %A!
77 = Лиценз. соглашение
78 = Тип файла:
79 = Файл не сохранен! Выйти?
80 = Файл сохранен
81 = Буфер обмена
82 = %A - копия
83 = %A - копия (%B)
84 = Операция успешно выполнена.
85 = Файл
86 = Файл не сохранен! Снимите атрибут Read Only.
87 = Гб
88 = Выделить
89 = Выделить всё
90 = Сбросить всё
91 = Открывать неподдерживаемые типы файлов как текст
92 = Сортировка
93 = Поворот экрана
94 = Для применения настроек потребуется перезапуск.
95 = Извлечь...
96 = Извлечь всё...
97 = Извлечь в:
98 = Папка не существует и создать её невозможно!
99 = Файлы успешно извлечены.
100 = Да для всех
101 = Нет для всех
102 = Вибрация при нажатии клавиш, мс
103 = Упакован:
104 = Файл
105 = Архив
106 = Свойства
107 = Операции
108 = Создать
109 = Интерфейс
110 = Минимум визуальных эффектов
111 = Архив...
112 = Уровень сжатия
113 = Редактор ID3v1
114 = Название
115 = Исполнитель
116 = Альбом
117 = Год
118 = Комментарий
119 = Номер трека
120 = Жанр
121 = Мб
122 = Влево
123 = Вправо
124 = Вверх
125 = Вниз
126 = Левая софт
127 = Правая софт
128 = Джойстик
129 = Звонок
130 = Отмена
131 = Вверх на экран
132 = Вниз на экран
133 = Вверх на файл
134 = Вниз на файл
135 = Гор. клавиши
136 = Дополнительно
137 = Панели
138 = Панель 1
139 = Панель 2
140 = Панель 3
141 = Панель 4
142 = Панель 5
143 = Панель 6
144 = Панель 7
145 = Панель 8
146 = Панель 9
147 = Панель 10
148 = Во весь экран
149 = пусто
150 = Клавиатура...
151 = Язык / Language
152 = Цветовая схема
153 = Проверять аттрибуты файлов
154 = Точная проверка директорий
155 = Сортировка списка файлов
156 = Только чтение
157 = Скрытый
158 = Содержит
159 = %A папок, %B файлов
160 = Настройки плеера
161 = Кодировка ID3
162 = Показывать прогресс-бар
163 = Размер буфера трекерных модулей, сек.
164 = Выполнено
165 = Настройки текстового редактора
166 = Показывать символ CR
167 = Показывать символ LF
168 = Заменять табуляцию пробелами
169 = Переход
170 = Постраничная прокрутка вместо построчной
171 = Раскладка клавиатуры
172 = Начальная настройка
173 = Режим часов
174 = Переключение
175 = След. панель
176 = Пред. панель
177 = След. пустая
178 = Пред. пустая
179 = Обмен панелей
180 = Изменить
181 = Поиск
182 = Шрифт
183 = Кодировка
184 = Рекурсивный поиск
185 = Хеш-сумма
186 = Шифрование
187 = Пароль
188 = Используйте повторное шифрование с тем же паролем для расшифровки.
189 = Малый
190 = Средний
191 = Большой
192 = Тип
193 = Стиль
194 = Жирный
195 = Курсив
196 = Моноширинный
197 = Пропорциональный
198 = Системный
199 = Подчеркнутый
200 = Показывать номера пунктов меню
201 = Воспроизведение в случайном порядке
202 = Перекодировать
203 = Заказная
204 = Плейлист
205 = Искать в архивах
206 = Аудио
207 = Видео
208 = Сохранять пути
209 = Абсолютные
210 = Относительные
211 = Архиватор ZIP
212 = Архиватор PPK
213 = Аудиопроигрыватель
214 = Просмотр изображений
215 = Видеопроигрыватель
216 = Текстовый редактор
217 = Редактор заметок
218 = Трекерный проигрыватель
219 = Установщик цветовых схем
220 = Просмотр векторных изображений
221 = Курсор в виде рамки
222 = Без изменений
223 = Установить
224 = Сбросить
225 = Фоновое изображение
226 = Шаблон имени
227 = Свернуть
228 = Сохранить изменения?
229 = Сохранить как...
230 = Правка
231 = Отменить
232 = Повторить
233 = Найти
234 = Найти далее
235 = Текст
236 = Кодировка архивов
237 = Номер строки
238 = Запоминать открытые пути
239 = Шаблоны
240 = Использовать UTF BOM сигнатуру
241 = Достигнут конец файла. Продолжить поиск с начала?
242 = В начало
243 = В конец
244 = Добавить
245 = Проигрывать сигналы в сообщениях
246 = Поменять местами софт-клавиши в меню
247 = Не учитывать регистр
248 = Не сортировать
249 = По имени
250 = По типу
251 = По дате изменения
252 = По размеру
253 = Опции сортировки
254 = В обратном порядке
255 = Перезапуск
256 = Переводить курсор при выделении
257 = Заменить
258 = Заменить все
259 = Заменить на
260 = Переместить часы
261 = совпадений
262 = Эквалайзер
263 = Гц
264 = КГц
265 = дБ
266 = Использовать акселерометр
267 = Постоянная подсветка
268 = Частота дискретизации трекерных модулей
269 = Качество ресемплинга трекерных модулей
270 = Низкое
271 = Среднее
272 = Высокое
273 = Отключено
274 = Включено
275 = Автоматически
276 = Экранировать
277 = Разэкранировать
278 = Буфер обмена пуст!
279 = Модули
280 = Упаковка файла %A...
281 = Списки воспроизведения
282 = Заглушка
283 = Символ
284 = Заголовок текстового окна
285 = Обычный
286 = Бегущая строка
287 = Архив ZIP
288 = Архив PPK
289 = Распаковка файла %A...
290 = Монитор памяти
291 = Обновить
292 = Заполнить
293 = Занято
294 = Всего
295 = Шаг монитора памяти, мс
296 = Порог сборщика мусора, %
297 = Контейнеры
298 = Закрыть
299 = Закрыть все
300 = Запись файла %A...
301 = Палитра
302 = Подбор цвета
303 = %A обращ., %B завис.
304 = Скорость прокрутки длинных элементов
305 = Установка цветовой схемы...
306 = Улучшенные градиенты
307 = Прозрачность в градиентах
308 = Размер текстового буфера, симв.
309 = Полные имена файлов
310 = В Буфере обмена
311 = В Избранном
312 = Ввод
313 = Назначение клавиш
314 = Пользовательские клавиши
315 = Редактор клавиш
316 = Код клавиши
317 = Собственный обработчик устройства
318 = Аббревиатура
319 = Нажмите клавишу...
320 = Гор. %A
321 = Удерж. %A
322 = Корень
323 = Список файлов
324 = Корзина
325 = Архиватор RAR
326 = Назначить
327 = Сбросить
328 = Кешировать кодовые страницы
329 = Крупный шрифт
330 = В списке файлов
331 = В меню
332 = "Выход" в списке дисков
333 = Формат метаданных
334 = Показывать заголовки метаданных
335 = Регулярные выражения
336 = Многострочное сравнение
337 = Заменять обратные ссылки
[1000]
0 = Распаковщик языковых пакетов
1 = Запаковщик языковых пакетов
[2000]
0 = Склейка файлов
1 = Делитель файлов
2 = Количество частей
3 = Размер части
4 = Размер файла неизвестен, разделение невозможно.
[3000]
0 = Просмотр моделей MascotCapsule
1 = Просмотр анимации MascotCapsule
2 = Загрузчик текстур MascotCapsule
3 = S %A Rx %D° Ry %E° Px %G Py %H F %J
[3500]
0 = Перекодировщик Fishlabs
1 = Декомпилятор Java
2 = Просмотр Flash (swf)
3 = Скрыть файл

BIN
res/style/Cold Steel.ncs Normal file

Binary file not shown.

BIN
res/style/Default.ncs Normal file

Binary file not shown.

BIN
res/style/Just Blue.ncs Normal file

Binary file not shown.

3
res/style/style.ini Normal file
View File

@ -0,0 +1,3 @@
Default
Cold Steel
Just Blue

24
res/temp/html.tpl Normal file
View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="application/html; charset=utf-8"/>
<link rel="shortcut icon" href="http://site.ru/favicon.ico">
<title>Title</title>
<style type="text/css">
body {background-color: black;}
a:link,a:active,a:visited {color: #6E7B8B; text-decoration: underline;}
</style>
</head>
<body>
</body></html>

24
res/temp/php-wml.tpl Normal file
View File

@ -0,0 +1,24 @@
<?php
Header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
Header("Cache-Control: no-cache, must-revalidate");
Header("Pragma: no-cache");
Header("Last-Modified: ".gmdate("D, d M Y H:i:s")."GMT");
Header("Cache-Control: post-check=0, pre-check=0", false);
header("Content-type:text/vnd.wap.wml; charset=utf-8");
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">';
echo '<wml>';
echo "\r\n<!-- Comment -->\r\n";
echo '<card id="card1" title="Title">';
echo '<p align="center">';
echo '</p></card></wml>';
?>

32
res/temp/php-xhtml.tpl Normal file
View File

@ -0,0 +1,32 @@
<?php
Header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
Header("Cache-Control: no-cache, must-revalidate");
Header("Pragma: no-cache");
Header("Last-Modified: ".gmdate("D, d M Y H:i:s")."GMT");
Header("Cache-Control: post-check=0, pre-check=0", false);
header("Content-Type: text/html; charset=utf-8");
echo '<?xml version="1.0" encoding="utf-8"?>';
echo '<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10-flat.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">';
echo '<head>';
echo '<meta http-equiv="expires" content="0"/>';
echo '<meta http-equiv="cache-control" content="no-cache"/>';
echo '<meta http-equiv="pragma" content="no-cache"/>';
echo '<link rel="shortcut icon" href="http://site.ru/favicon.ico" type="image/x-icon"/>';
echo '<meta http-equiv="Copyright" content=""/>';
echo '<meta name="keywords" content=""/>';
echo '<meta name="document-state" content="dynamic"/>';
echo '<meta name="description" content=""/>';
echo '<link rel="stylesheet" media="all" type="text/css" href="http://site.ru/style.css"/>';
echo '<title>Title</title>';
echo '</head><body>';
echo '</body></html>';
?>

8
res/temp/php.tpl Normal file
View File

@ -0,0 +1,8 @@
<?php
?>

6
res/temp/template.ini Normal file
View File

@ -0,0 +1,6 @@
HTML Page = html
XHTML Page = xhtml
WML Page = wml
PHP Script = php
PHP XHTML Script = php-xhtml
PHP WML Script = php-wml

13
res/temp/wml.tpl Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">
<wml>
<!-- Comment -->
<card id="card1" title="Title">
<p align="center">
</p></card></wml>

21
res/temp/xhtml.tpl Normal file
View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10-flat.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
<head>
<meta http-equiv="expires" content="0"/>
<meta http-equiv="cache-control" content="no-cache"/>
<meta http-equiv="pragma" content="no-cache"/>
<link rel="shortcut icon" href="http://site.ru/favicon.ico" type="image/x-icon"/>
<meta http-equiv="Copyright" content=""/>
<meta name="keywords" content=""/>
<meta name="document-state" content="dynamic"/>
<meta name="description" content=""/>
<link rel="stylesheet" media="all" type="text/css" href="http://site.ru/style.css"/>
<title>Title</title>
</head><body>
</body></html>

94
src/AccelImpl.java Normal file
View File

@ -0,0 +1,94 @@
import com.one.Accelerometer;
//#if JSR256 == "true"
import com.vmx.AuxClass;
import javax.microedition.sensor.*;
import javax.microedition.io.Connector;
import java.io.IOException;
public class AccelImpl implements Accelerometer
{
protected int[] channels = new int[3];
protected String[] channelNames = new String[3];
protected SensorConnection sensor;
public AccelImpl() throws ClassNotFoundException, IOException
{
if(!AuxClass.classExists("javax.microedition.sensor.SensorConnection"))
{
throw new ClassNotFoundException();
}
SensorInfo[] info = SensorManager.findSensors("acceleration", null);
ChannelInfo[] ci = info[0].getChannelInfos();
for(int r = 0; r < ci.length; r++)
{
channelNames[r] = ci[r].getName();
}
sensor = (SensorConnection)Connector.open(info[0].getUrl());
if(sensor == null)
{
throw new ClassNotFoundException();
}
}
public int getValue(int channel)
{
getDelta(channel, 0);
return channels[channel];
}
public int getDelta(int channel, int threshold)
{
int delta = 0;
try
{
Data[] data = sensor.getData(1, -1, false, false, false);
int drx = 0;
for(int i = 0; i < data.length; i++)
{
if(data[i].getChannelInfo().getName().equals(channelNames[channel]))
{
drx = data[i].getIntValues()[0];
}
}
delta = channels[channel] - drx;
channels[channel] = drx;
if(Math.abs(delta) < threshold)
{
delta = 0;
}
}
catch(Throwable t)
{
}
return delta;
}
}
//#else
//#
//# public class AccelImpl implements Accelerometer
//# {
//# public int getValue( int channel)
//# {
//# return 0;
//# }
//#
//# public int getDelta(int channel, int threshold)
//# {
//# return 0;
//# }
//# }
//#
//#endif

64
src/Browser.java Normal file
View File

@ -0,0 +1,64 @@
import com.one.Accelerometer;
import com.one.file.ConnectionProvider;
import com.one.file.GenericConnectionProvider;
import javax.microedition.midlet.MIDlet;
import javax.microedition.lcdui.Display;
import java.io.InputStream;
import javax.microedition.midlet.MIDletStateChangeException;
public class Browser extends MIDlet implements com.one.RootLoader
{
protected Browser ref;
protected filemanager.main app;
public Browser()
{
ref = this;
app = new filemanager.main(this);
}
public void startApp() throws MIDletStateChangeException
{
app.startApp();
}
public void pauseApp()
{
app.pauseApp();
}
public void destroyApp(boolean unc) throws MIDletStateChangeException
{
app.destroyApp(unc);
}
public void restartApp()
{
app.restartApp();
}
public Display getDisplay()
{
return Display.getDisplay(this);
}
public InputStream getResourceAsStream(String resource)
{
return ref.getClass().getResourceAsStream(resource);
}
public Accelerometer getAccelerometer()
{
return null;
}
public ConnectionProvider getConnectionProvider()
{
return new GenericConnectionProvider();
}
public boolean useNoEffects()
{
return true;
}
}

104
src/ResetRMS.java Normal file
View File

@ -0,0 +1,104 @@
import com.vmx.AuxClass;
import javax.microedition.lcdui.Choice;
import javax.microedition.lcdui.ChoiceGroup;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Form;
import javax.microedition.midlet.*;
import javax.microedition.rms.RecordStore;
import javax.microedition.rms.RecordStoreNotFoundException;
public class ResetRMS extends MIDlet implements CommandListener
{
protected Form form;
protected ChoiceGroup cgrms;
protected static final Command cmdClear = new Command("Clear", Command.OK, 1);
protected static final Command cmdClearAll = new Command("Clear all", Command.OK, 2);
protected static final Command cmdExit = new Command("Exit", Command.EXIT, 3);
public ResetRMS()
{
form = new Form("Reset RMS");
form.append("If you are encountering a problem running this application due to incorrectly done settings or wrong stored data, you might want to clear some or all of the RMS storages listed below. Clearing a storage will cause the program to re-write it with the appropriate data, as if it was the first time it was launched.");
cgrms = new ChoiceGroup("RMS storages", Choice.MULTIPLE, AuxClass.STORE_NAMES, null);
form.append(cgrms);
form.addCommand(cmdClear);
form.addCommand(cmdClearAll);
form.addCommand(cmdExit);
form.setCommandListener(this);
}
public void startApp()
{
Display.getDisplay(this).setCurrent(form);
}
public void pauseApp()
{
notifyPaused();
}
public void destroyApp(boolean unconditional)
{
notifyDestroyed();
}
public void commandAction(Command c, Displayable dp)
{
boolean flag = true;
if(c == cmdClear)
{
for(int i = 0; i < AuxClass.STORE_NAMES.length; i++)
{
if(cgrms.isSelected(i))
{
try
{
RecordStore.deleteRecordStore(AuxClass.getStoreName(i));
}
catch(RecordStoreNotFoundException rsnfe)
{
}
catch(Exception e)
{
form.append(e.toString());
flag = false;
}
}
}
}
else if(c == cmdClearAll)
{
String[] stores = RecordStore.listRecordStores();
for(int i = 0; i < stores.length; i++)
{
try
{
RecordStore.deleteRecordStore(stores[i]);
}
catch(RecordStoreNotFoundException rsnfe)
{
}
catch(Exception e)
{
form.append(e.toString());
flag = false;
}
}
}
if(flag)
{
destroyApp(false);
}
}
}

34
src/Test.java Normal file
View File

@ -0,0 +1,34 @@
import com.one.DisplayManager;
import com.one.PaintableObject;
import com.one.TestCanvas;
import javax.microedition.lcdui.Display;
import javax.microedition.midlet.*;
public class Test extends MIDlet
{
DisplayManager dsp;
TestCanvas tc;
public Test()
{
dsp = new DisplayManager(Display.getDisplay(this));
PaintableObject.setRenderer(dsp.getRenderer());
tc = new TestCanvas();
}
public void startApp()
{
dsp.setCurrent(tc);
}
public void pauseApp()
{
notifyPaused();
}
public void destroyApp(boolean unconditional)
{
notifyDestroyed();
}
}

81
src/UniFM.java Normal file
View File

@ -0,0 +1,81 @@
import com.one.Accelerometer;
import com.one.file.ConnectionProvider;
import com.one.file.GenericConnectionProvider;
import javax.microedition.midlet.MIDlet;
import javax.microedition.lcdui.Display;
import java.io.InputStream;
import javax.microedition.midlet.MIDletStateChangeException;
import mcp.MultiConnectionProvider;
public class UniFM extends MIDlet implements com.one.RootLoader
{
protected UniFM ref;
protected filemanager.main app;
public UniFM()
{
ref = this;
app = new filemanager.main(this);
}
public void startApp() throws MIDletStateChangeException
{
app.startApp();
}
public void pauseApp()
{
app.pauseApp();
}
public void destroyApp(boolean unc) throws MIDletStateChangeException
{
app.destroyApp(unc);
}
public void restartApp()
{
app.restartApp();
}
public Display getDisplay()
{
return Display.getDisplay(this);
}
public InputStream getResourceAsStream(String resource)
{
return ref.getClass().getResourceAsStream(resource);
}
public Accelerometer getAccelerometer()
{
try
{
return new AccelImpl();
}
catch(Throwable t)
{
t.printStackTrace();
return null;
}
}
public ConnectionProvider getConnectionProvider()
{
try
{
return new MultiConnectionProvider();
}
catch(Throwable t)
{
t.printStackTrace();
return new GenericConnectionProvider();
}
}
public boolean useNoEffects()
{
return false;
}
}

View File

@ -0,0 +1,456 @@
/* PipedInputStream.java -- Read portion of piped streams.
Copyright (C) 1998, 1999, 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package com.classpath.io;
import java.io.IOException;
import java.io.InputStream;
import java.io.InterruptedIOException;
// NOTE: This implementation is very similar to that of PipedReader. If you
// fix a bug in here, chances are you should make a similar change to the
// PipedReader code.
/**
* An input stream that reads its bytes from an output stream
* to which it is connected.
* <p>
* Data is read and written to an internal buffer. It is highly recommended
* that the <code>PipedInputStream</code> and connected
* <code>PipedOutputStream</code>
* be part of different threads. If they are not, the read and write
* operations could deadlock their thread.
*
* @specnote The JDK implementation appears to have some undocumented
* functionality where it keeps track of what thread is writing
* to pipe and throws an IOException if that thread susequently
* dies. This behaviour seems dubious and unreliable - we don't
* implement it.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public class PipedInputStream extends InputStream
{
/** PipedOutputStream to which this is connected. Null only if this
* InputStream hasn't been connected yet. */
PipedOutputStream source;
/** Set to true if close() has been called on this InputStream. */
boolean closed;
/** Exception passed by the source. */
IOException exception;
/**
* The size of the internal buffer used for input/output.
*/
/* The "Constant Field Values" Javadoc of the Sun J2SE 1.4
* specifies 1024.
*/
protected static final int PIPE_SIZE = 1024;
/**
* This is the internal circular buffer used for storing bytes written
* to the pipe and from which bytes are read by this stream
*/
protected byte[] buffer = null;
/**
* The index into buffer where the next byte from the connected
* <code>PipedOutputStream</code> will be written. If this variable is
* equal to <code>out</code>, then the buffer is full. If set to < 0,
* the buffer is empty.
*/
protected int in = -1;
/**
* This index into the buffer where bytes will be read from.
*/
protected int out = 0;
/** Buffer used to implement single-argument read/receive */
private byte[] read_buf = new byte[1];
/**
* Creates a new <code>PipedInputStream</code> that is not connected to a
* <code>PipedOutputStream</code>. It must be connected before bytes can
* be read from this stream.
*/
public PipedInputStream()
{
this(PIPE_SIZE);
}
/**
* Creates a new <code>PipedInputStream</code> of the given size that is not
* connected to a <code>PipedOutputStream</code>.
* It must be connected before bytes can be read from this stream.
*
* @since 1.6
* @since IllegalArgumentException If pipeSize <= 0.
*/
public PipedInputStream(int pipeSize) throws IllegalArgumentException
{
if(pipeSize <= 0)
{
throw new IllegalArgumentException("pipeSize must be > 0");
}
this.buffer = new byte[pipeSize];
}
/**
* This constructor creates a new <code>PipedInputStream</code> and connects
* it to the passed in <code>PipedOutputStream</code>. The stream is then
* ready for reading.
*
* @param source The <code>PipedOutputStream</code> to connect this
* stream to
*
* @exception IOException If <code>source</code> is already connected.
*/
public PipedInputStream(PipedOutputStream source) throws IOException
{
this();
connect(source);
}
/**
* This constructor creates a new <code>PipedInputStream</code> of the given
* size and connects it to the passed in <code>PipedOutputStream</code>.
* The stream is then ready for reading.
*
* @param source The <code>PipedOutputStream</code> to connect this
* stream to
*
* @since 1.6
* @exception IOException If <code>source</code> is already connected.
*/
public PipedInputStream(PipedOutputStream source, int pipeSize)
throws IOException
{
this(pipeSize);
connect(source);
}
/**
* This method connects this stream to the passed in
* <code>PipedOutputStream</code>.
* This stream is then ready for reading. If this stream is already
* connected or has been previously closed, then an exception is thrown
*
* @param source The <code>PipedOutputStream</code> to connect this stream to
*
* @exception IOException If this PipedInputStream or <code>source</code>
* has been connected already.
*/
public void connect(PipedOutputStream source) throws IOException
{
// The JDK (1.3) does not appear to check for a previously closed
// connection here.
if(this.source != null || source.sink != null)
{
throw new IOException("Already connected");
}
source.sink = this;
this.source = source;
}
/**
* This method receives a byte of input from the source PipedOutputStream.
* If the internal circular buffer is full, this method blocks.
*
* @param val The byte to write to this stream
*
* @exception IOException if error occurs
* @specnote Weird. This method must be some sort of accident.
*/
synchronized void receive(int val) throws IOException
{
read_buf[0] = (byte) (val & 0xff);
receive(read_buf, 0, 1);
}
/**
* This method is used by the connected <code>PipedOutputStream</code> to
* write bytes into the buffer.
*
* @param buf The array containing bytes to write to this stream
* @param offset The offset into the array to start writing from
* @param len The number of bytes to write.
*
* @exception IOException If an error occurs
* @specnote This code should be in PipedOutputStream.write, but we
* put it here in order to support that bizarre recieve(int)
* method.
*/
synchronized void receive(byte[] buf, int offset, int len)
throws IOException
{
if(closed)
{
throw new IOException("Pipe closed");
}
int bufpos = offset;
int copylen;
while(len > 0)
{
try
{
while(in == out)
{
// The pipe is full. Wake up any readers and wait for them.
notifyAll();
wait();
// The pipe could have been closed while we were waiting.
if(closed)
{
throw new IOException("Pipe closed");
}
}
}
catch(InterruptedException ix)
{
throw new InterruptedIOException();
}
if(in < 0) // The pipe is empty.
{
in = 0;
}
// Figure out how many bytes from buf can be copied without
// overrunning out or going past the length of the buffer.
if(in < out)
{
copylen = Math.min(len, out - in);
}
else
{
copylen = Math.min(len, buffer.length - in);
}
// Copy bytes until the pipe is filled, wrapping if necessary.
System.arraycopy(buf, bufpos, buffer, in, copylen);
len -= copylen;
bufpos += copylen;
in += copylen;
if(in == buffer.length)
{
in = 0;
}
}
// Notify readers that new data is in the pipe.
notifyAll();
}
/**
* This method reads one byte from the stream.
* -1 is returned to indicated that no bytes can be read
* because the end of the stream was reached. If the stream is already
* closed, a -1 will again be returned to indicate the end of the stream.
*
* <p>This method will block if no byte is available to be read.</p>
*
* @return the value of the read byte value, or -1 of the end of the stream
* was reached
*
* @throws IOException if an error occured
*/
public int read() throws IOException
{
// Method operates by calling the multibyte overloaded read method
// Note that read_buf is an internal instance variable. I allocate it
// there to avoid constant reallocation overhead for applications that
// call this method in a loop at the cost of some unneeded overhead
// if this method is never called.
int r = read(read_buf, 0, 1);
return r != -1 ? (read_buf[0] & 0xff) : -1;
}
/**
* This method reads bytes from the stream into a caller supplied buffer.
* It starts storing bytes at position <code>offset</code> into the
* buffer and
* reads a maximum of <code>len</code> bytes. Note that this method
* can actually
* read fewer than <code>len</code> bytes. The actual number of bytes
* read is
* returned. A -1 is returned to indicated that no bytes can be read
* because the end of the stream was reached - ie close() was called on the
* connected PipedOutputStream.
* <p>
* This method will block if no bytes are available to be read.
*
* @param buf The buffer into which bytes will be stored
* @param offset The index into the buffer at which to start writing.
* @param len The maximum number of bytes to read.
*
* @exception IOException If <code>close()</code> was called on this Piped
* InputStream.
*/
public synchronized int read(byte[] buf, int offset, int len)
throws IOException
{
if(source == null)
{
throw new IOException("Not connected");
}
if(closed)
{
throw new IOException("Pipe closed");
}
if(exception != null)
{
throw exception;
}
// Don't block if nothing was requested.
if(len == 0)
{
return 0;
}
// If the buffer is empty, wait until there is something in the pipe
// to read.
try
{
while(in < 0)
{
if(source.closed)
{
return -1;
}
wait();
}
}
catch(InterruptedException ix)
{
throw new InterruptedIOException();
}
int total = 0;
int copylen;
while(true)
{
// Figure out how many bytes from the pipe can be copied without
// overrunning in or going past the length of buf.
if(out < in)
{
copylen = Math.min(len, in - out);
}
else
{
copylen = Math.min(len, buffer.length - out);
}
System.arraycopy(buffer, out, buf, offset, copylen);
offset += copylen;
len -= copylen;
out += copylen;
total += copylen;
if(out == buffer.length)
{
out = 0;
}
if(out == in)
{
// Pipe is now empty.
in = -1;
out = 0;
}
// If output buffer is filled or the pipe is empty, we're done.
if(len == 0 || in == -1)
{
// Notify any waiting outputstream that there is now space
// to write.
notifyAll();
return total;
}
}
}
/**
* This method returns the number of bytes that can be read from this stream
* before blocking could occur. This is the number of bytes that are
* currently unread in the internal circular buffer. Note that once this
* many additional bytes are read, the stream may block on a subsequent
* read, but it not guaranteed to block.
*
* @return The number of bytes that can be read before blocking might occur
*
* @exception IOException If an error occurs
*/
public synchronized int available() throws IOException
{
// The JDK 1.3 implementation does not appear to check for the closed or
// unconnected stream conditions here.
if(in < 0)
{
return 0;
}
else if(out < in)
{
return in - out;
}
else
{
return (buffer.length - out) + in;
}
}
/**
* This methods closes the stream so that no more data can be read
* from it.
*
* @exception IOException If an error occurs
*/
public synchronized void close() throws IOException
{
closed = true;
// Wake any thread which may be in receive() waiting to write data.
notifyAll();
}
public boolean isPipeClosed()
{
return source.closed;
}
}

View File

@ -0,0 +1,212 @@
/* PipedOutputStream.java -- Write portion of piped streams.
Copyright (C) 1998, 2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package com.classpath.io;
import java.io.IOException;
import java.io.OutputStream;
// NOTE: This implementation is very similar to that of PipedWriter. If you
// fix a bug in here, chances are you should make a similar change to the
// PipedWriter code.
/**
* This class writes its bytes to a <code>PipedInputStream</code> to
* which it is connected.
* <p>
* It is highly recommended that a <code>PipedOutputStream</code> and its
* connected <code>PipedInputStream</code> be in different threads. If
* they are in the same thread, read and write operations could deadlock
* the thread.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public class PipedOutputStream extends OutputStream
{
/** Target PipedInputStream to which this is connected. Null only if this
* OutputStream hasn't been connected yet. */
PipedInputStream sink;
/** Set to true if close() has been called on this OutputStream. */
boolean closed;
/**
* Create an unconnected PipedOutputStream. It must be connected
* to a <code>PipedInputStream</code> using the <code>connect</code>
* method prior to writing any data or an exception will be thrown.
*/
public PipedOutputStream()
{
}
/**
* Create a new <code>PipedOutputStream</code> instance
* to write to the specified <code>PipedInputStream</code>. This stream
* is then ready for writing.
*
* @param sink The <code>PipedInputStream</code> to connect this stream to.
*
* @exception IOException If <code>sink</code> has already been connected
* to a different PipedOutputStream.
*/
public PipedOutputStream(PipedInputStream sink) throws IOException
{
sink.connect(this);
}
/**
* Connects this object to the specified <code>PipedInputStream</code>
* object. This stream will then be ready for writing.
*
* @param sink The <code>PipedInputStream</code> to connect this stream to
*
* @exception IOException If the stream has not been connected or has
* been closed.
*/
public void connect(PipedInputStream sink) throws IOException
{
if(this.sink != null || sink.source != null)
{
throw new IOException("Already connected");
}
sink.connect(this);
}
/**
* Write a single byte of date to the stream. Note that this method will
* block if the <code>PipedInputStream</code> to which this object is
* connected has a full buffer.
*
* @param b The byte of data to be written, passed as an <code>int</code>.
*
* @exception IOException If the stream has not been connected or has
* been closed.
*/
public void write(int b) throws IOException
{
if(sink == null)
{
throw new IOException("Not connected");
}
if(closed)
{
throw new IOException("Pipe closed");
}
sink.receive(b);
}
/**
* This method writes <code>len</code> bytes of data from the byte array
* <code>buf</code> starting at index <code>offset</code> in the array
* to the stream. Note that this method will block if the
* <code>PipedInputStream</code> to which this object is connected has
* a buffer that cannot hold all of the bytes to be written.
*
* @param buffer The array containing bytes to write to the stream.
* @param offset The index into the array to start writing bytes from.
* @param len The number of bytes to write.
*
* @exception IOException If the stream has not been connected or has
* been closed.
*/
public void write(byte[] buffer, int offset, int len) throws IOException
{
if(sink == null)
{
throw new IOException("Not connected");
}
if(closed)
{
throw new IOException("Pipe closed");
}
sink.receive(buffer, offset, len);
}
/**
* This method does nothing.
*
* @exception IOException If the stream is closed.
* @specnote You'd think that this method would block until the sink
* had read all available data. Thats not the case - this method
* appears to be a no-op?
*/
public void flush() throws IOException
{
}
/**
* This method closes this stream so that no more data can be written
* to it. Any further attempts to write to this stream may throw an
* exception
*
* @exception IOException If an error occurs
*/
public void close() throws IOException
{
// A close call on an unconnected PipedOutputStream has no effect.
if(sink != null)
{
closed = true;
// Notify any waiting readers that the stream is now closed.
synchronized(sink)
{
sink.notifyAll();
}
}
}
/**
* Test if connected stream was closed.
*
* @return true, if connected stream is closed.
*/
public boolean isPipeClosed()
{
return sink.closed;
}
/**
* Pass an IOException to the connected stream,
* so that it will be thrown on the next read() invocation.
*
* @param exception IOException instance
*/
public void passException(IOException exception)
{
sink.exception = exception;
}
}

View File

@ -0,0 +1,229 @@
/* Arrays.java -- Utility class with methods to operate on arrays
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package com.classpath.util;
import java.util.Vector;
/**
* This class contains various static utility methods performing operations on
* arrays, and a method to provide a List "view" of an array to facilitate
* using arrays with Collection-based APIs. All methods throw a
* {@link NullPointerException} if the parameter array is null.
* <p>
*
* Implementations may use their own algorithms, but must obey the general
* properties; for example, the sort must be stable and n*log(n) complexity.
* Sun's implementation of sort, and therefore ours, is a tuned quicksort,
* adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort
* Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265
* (November 1993). This algorithm offers n*log(n) performance on many data
* sets that cause other quicksorts to degrade to quadratic performance.
*
* @author Original author unknown
* @author Bryce McKinlay
* @author Eric Blake (ebb9@email.byu.edu)
* @see Comparable
* @see Comparator
* @since 1.2
* @status updated to 1.4
*/
public class Arrays
{
/**
* This class is non-instantiable.
*/
private Arrays()
{
}
/**
* Compare two byte arrays for equality.
*
* @param a1 the first array to compare
* @param a2 the second array to compare
* @return true if a1 and a2 are both null, or if a2 is of the same length
* as a1, and for each 0 <= i < a1.length, a1[i] == a2[i]
*/
public static boolean equals(byte[] a1, byte[] a2)
{
// Quick test which saves comparing elements of the same array, and also
// catches the case that both are null.
if(a1 == a2)
{
return true;
}
if(null == a1 || null == a2)
{
return false;
}
// If they're the same length, test each element
if(a1.length == a2.length)
{
int i = a1.length;
while(--i >= 0)
{
if(a1[i] != a2[i])
{
return false;
}
}
return true;
}
return false;
}
/**
* Fill an array with an int value.
*
* @param a the array to fill
* @param val the value to fill it with
*/
public static void fill(int[] a, int val)
{
fill(a, 0, a.length, val);
}
/**
* Fill a range of an array with an int value.
*
* @param a the array to fill
* @param fromIndex the index to fill from, inclusive
* @param toIndex the index to fill to, exclusive
* @param val the value to fill with
* @throws IllegalArgumentException if fromIndex &gt; toIndex
* @throws ArrayIndexOutOfBoundsException if fromIndex &lt; 0
* || toIndex &gt; a.length
*/
public static void fill(int[] a, int fromIndex, int toIndex, int val)
{
if(fromIndex > toIndex)
{
throw new IllegalArgumentException();
}
for(int i = fromIndex; i < toIndex; i++)
{
a[i] = val;
}
}
/**
* Fill an array with a byte value.
*
* @param a the array to fill
* @param val the value to fill it with
*/
public static void fill(byte[] a, byte val)
{
fill(a, 0, a.length, val);
}
/**
* Fill a range of an array with a byte value.
*
* @param a the array to fill
* @param fromIndex the index to fill from, inclusive
* @param toIndex the index to fill to, exclusive
* @param val the value to fill with
* @throws IllegalArgumentException if fromIndex &gt; toIndex
* @throws ArrayIndexOutOfBoundsException if fromIndex &lt; 0
* || toIndex &gt; a.length
*/
public static void fill(byte[] a, int fromIndex, int toIndex, byte val)
{
if(fromIndex > toIndex)
{
throw new IllegalArgumentException();
}
for(int i = fromIndex; i < toIndex; i++)
{
a[i] = val;
}
}
/**
* Fill an array with an Object value.
*
* @param a the array to fill
* @param val the value to fill it with
* @throws ClassCastException if val is not an instance of the element
* type of a.
*/
public static void fill(Object[] a, Object val)
{
fill(a, 0, a.length, val);
}
/**
* Fill a range of an array with an Object value.
*
* @param a the array to fill
* @param fromIndex the index to fill from, inclusive
* @param toIndex the index to fill to, exclusive
* @param val the value to fill with
* @throws ClassCastException if val is not an instance of the element
* type of a.
* @throws IllegalArgumentException if fromIndex &gt; toIndex
* @throws ArrayIndexOutOfBoundsException if fromIndex &lt; 0
* || toIndex &gt; a.length
*/
public static void fill(Object[] a, int fromIndex, int toIndex, Object val)
{
if(fromIndex > toIndex)
{
throw new IllegalArgumentException();
}
for(int i = fromIndex; i < toIndex; i++)
{
a[i] = val;
}
}
public static Vector asList(Object[] a)
{
Vector res = new Vector(a.length);
for(int i = 0; i < a.length; i++)
{
res.addElement(a[i]);
}
return res;
}
}

View File

@ -0,0 +1,29 @@
package com.classpath.util;
public final class ByteCache
{
// This caches Byte values, and is used by boxing conversions via
// valueOf(). We're required to cache all possible values here.
private static Byte[] byteCache = new Byte[Byte.MAX_VALUE - Byte.MIN_VALUE + 1];
static
{
for(int i = Byte.MIN_VALUE; i <= Byte.MAX_VALUE; i++)
{
byteCache[i - Byte.MIN_VALUE] = new Byte((byte) i);
}
}
/**
* Returns a <code>Byte</code> object wrapping the value.
* In contrast to the <code>Byte</code> constructor, this method
* will cache some values. It is used by boxing conversion.
*
* @param val the value to wrap
* @return the <code>Byte</code>
*/
public static Byte valueOf(byte val)
{
return byteCache[val - Byte.MIN_VALUE];
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,206 @@
/* Adler32.java - Computes Adler32 data checksum of a data stream
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
//package java.util.zip;
package com.classpath.zip;
/*
* Written using on-line Java Platform 1.2 API Specification, as well
* as "The Java Class Libraries", 2nd edition (Addison-Wesley, 1998).
* The actual Adler32 algorithm is taken from RFC 1950.
* Status: Believed complete and correct.
*/
/**
* Computes Adler32 checksum for a stream of data. An Adler32
* checksum is not as reliable as a CRC32 checksum, but a lot faster to
* compute.
*<p>
* The specification for Adler32 may be found in RFC 1950.
* (ZLIB Compressed Data Format Specification version 3.3)
*<p>
*<p>
* From that document:
*<p>
* "ADLER32 (Adler-32 checksum)
* This contains a checksum value of the uncompressed data
* (excluding any dictionary data) computed according to Adler-32
* algorithm. This algorithm is a 32-bit extension and improvement
* of the Fletcher algorithm, used in the ITU-T X.224 / ISO 8073
* standard.
*<p>
* Adler-32 is composed of two sums accumulated per byte: s1 is
* the sum of all bytes, s2 is the sum of all s1 values. Both sums
* are done modulo 65521. s1 is initialized to 1, s2 to zero. The
* Adler-32 checksum is stored as s2*65536 + s1 in most-
* significant-byte first (network) order."
*<p>
* "8.2. The Adler-32 algorithm
*<p>
* The Adler-32 algorithm is much faster than the CRC32 algorithm yet
* still provides an extremely low probability of undetected errors.
*<p>
* The modulo on unsigned long accumulators can be delayed for 5552
* bytes, so the modulo operation time is negligible. If the bytes
* are a, b, c, the second sum is 3a + 2b + c + 3, and so is position
* and order sensitive, unlike the first sum, which is just a
* checksum. That 65521 is prime is important to avoid a possible
* large class of two-byte errors that leave the check unchanged.
* (The Fletcher checksum uses 255, which is not prime and which also
* makes the Fletcher check insensitive to single byte changes 0 <->
* 255.)
*<p>
* The sum s1 is initialized to 1 instead of zero to make the length
* of the sequence part of s2, so that the length does not have to be
* checked separately. (Any sequence of zeroes has a Fletcher
* checksum of zero.)"
*
* @author John Leuner, Per Bothner
* @since JDK 1.1
*
* @see InflaterInputStream
* @see DeflaterOutputStream
*/
public class Adler32 implements Checksum
{
/** largest prime smaller than 65536 */
private static final int BASE = 65521;
private int checksum; //we do all in int.
//Note that java doesn't have unsigned integers,
//so we have to be careful with what arithmetic
//we do. We return the checksum as a long to
//avoid sign confusion.
/**
* Creates a new instance of the <code>Adler32</code> class.
* The checksum starts off with a value of 1.
*/
public Adler32 ()
{
reset ();
}
/**
* Resets the Adler32 checksum to the initial value.
*/
public void reset ()
{
checksum = 1; //Initialize to 1
}
/**
* Updates the checksum with the byte b.
*
* @param bval the data value to add. The high byte of the int is ignored.
*/
public void update (int bval)
{
//We could make a length 1 byte array and call update again, but I
//would rather not have that overhead
int s1 = checksum & 0xffff;
int s2 = checksum >>> 16;
s1 = (s1 + (bval & 0xFF)) % BASE;
s2 = (s1 + s2) % BASE;
checksum = (s2 << 16) + s1;
}
/**
* Updates the checksum with the bytes taken from the array.
*
* @param buffer an array of bytes
*/
public void update (byte[] buffer)
{
update (buffer, 0, buffer.length);
}
/**
* Updates the checksum with the bytes taken from the array.
*
* @param buf an array of bytes
* @param off the start of the data used for this update
* @param len the number of bytes to use for this update
*/
public void update (byte[] buf, int off, int len)
{
//(By Per Bothner)
int s1 = checksum & 0xffff;
int s2 = checksum >>> 16;
while (len > 0)
{
// We can defer the modulo operation:
// s1 maximally grows from 65521 to 65521 + 255 * 3800
// s2 maximally grows by 3800 * median(s1) = 2090079800 < 2^31
int n = 3800;
if (n > len)
n = len;
len -= n;
while (--n >= 0)
{
s1 = s1 + (buf[off++] & 0xFF);
s2 = s2 + s1;
}
s1 %= BASE;
s2 %= BASE;
}
/*Old implementation, borrowed from somewhere:
int n;
while (len-- > 0) {
s1 = (s1 + (bs[offset++] & 0xff)) % BASE;
s2 = (s2 + s1) % BASE;
}*/
checksum = (s2 << 16) | s1;
}
/**
* Returns the Adler32 data checksum computed so far.
*/
public long getValue ()
{
return (long) checksum & 0xffffffffL;
}
}

View File

@ -0,0 +1,135 @@
/* CRC32.java - Computes CRC32 data checksum of a data stream
Copyright (C) 1999. 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
//package java.util.zip;
package com.classpath.zip;
/*
* Written using on-line Java Platform 1.2 API Specification, as well
* as "The Java Class Libraries", 2nd edition (Addison-Wesley, 1998).
* The actual CRC32 algorithm is taken from RFC 1952.
* Status: Believed complete and correct.
*/
/**
* Computes CRC32 data checksum of a data stream.
* The actual CRC32 algorithm is described in RFC 1952
* (GZIP file format specification version 4.3).
* Can be used to get the CRC32 over a stream if used with checked input/output
* streams.
*
* @see InflaterInputStream
* @see DeflaterOutputStream
*
* @author Per Bothner
* @date April 1, 1999.
*/
public class CRC32 implements Checksum
{
/** The crc data checksum so far. */
private int crc = 0;
/** The fast CRC table. Computed once when the CRC32 class is loaded. */
private static int[] crc_table = make_crc_table ();
/** Make the table for a fast CRC. */
private static int[] make_crc_table ()
{
int[] crc_table = new int[256];
for (int n = 0; n < 256; n++)
{
int c = n;
for (int k = 8; --k >= 0; )
{
if ((c & 1) != 0)
c = 0xedb88320 ^ (c >>> 1);
else
c = c >>> 1;
}
crc_table[n] = c;
}
return crc_table;
}
/**
* Returns the CRC32 data checksum computed so far.
*/
public long getValue ()
{
return (long) crc & 0xffffffffL;
}
/**
* Resets the CRC32 data checksum as if no update was ever called.
*/
public void reset ()
{ crc = 0; }
/**
* Updates the checksum with the int bval.
*
* @param bval (the byte is taken as the lower 8 bits of bval)
*/
public void update (int bval)
{
int c = ~crc;
c = crc_table[(c ^ bval) & 0xff] ^ (c >>> 8);
crc = ~c;
}
/**
* Adds the byte array to the data checksum.
*
* @param buf the buffer which contains the data
* @param off the offset in the buffer where the data starts
* @param len the length of the data
*/
public void update (byte[] buf, int off, int len)
{
int c = ~crc;
while (--len >= 0)
c = crc_table[(c ^ buf[off++]) & 0xff] ^ (c >>> 8);
crc = ~c;
}
/**
* Adds the complete byte array to the data checksum.
*/
public void update (byte[] buf)
{ update (buf, 0, buf.length); }
}

View File

@ -0,0 +1,66 @@
package com.classpath.zip;
import com.vmx.AuxClass;
import com.vmx.StringEncoder;
import java.io.*;
class CentralDirectoryEndRecord
{
public int numEntries, // total number of entries in the central dir
centralSize, // size of the central directory
centralOffset; // offset of start of central directory
public String comment;
public CentralDirectoryEndRecord()
{
numEntries = 0;
centralSize = 0;
centralOffset = 0;
comment = "";
}
public boolean read(InputStream is) throws IOException
{
if(AuxClass.readLeInt(is) != ZipConstants.ENDSIG)
{
return false;
}
is.skip(6);
numEntries = AuxClass.readLeShort(is);
centralSize = AuxClass.readLeInt(is);
centralOffset = AuxClass.readLeInt(is);
int commentLen = AuxClass.readLeShort(is);
if(commentLen > 0)
{
comment = StringEncoder.readString(is, commentLen, StringEncoder.ENC_ARCHIVE);
}
else
{
comment = "";
}
return true;
}
public void write(OutputStream os) throws IOException
{
AuxClass.writeLeInt(os, ZipConstants.ENDSIG);
AuxClass.writeLeShort(os, 0); /* disk number */
AuxClass.writeLeShort(os, 0); /* disk with start of central dir */
AuxClass.writeLeShort(os, numEntries);
AuxClass.writeLeShort(os, numEntries);
AuxClass.writeLeInt(os, centralSize);
AuxClass.writeLeInt(os, centralOffset);
byte[] zipComment = StringEncoder.encodeString(comment, StringEncoder.ENC_ARCHIVE);
AuxClass.writeLeShort(os, zipComment.length);
os.write(zipComment);
}
}

View File

@ -0,0 +1,137 @@
/* CheckedInputStream.java - Compute checksum of data being read
Copyright (C) 1999, 2000, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
//package java.util.zip;
package com.classpath.zip;
//import java.io.FilterInputStream;
import java.io.IOException;
import java.io.InputStream;
/* Written using on-line Java Platform 1.2 API Specification
* and JCL book.
* Believed complete and correct.
*/
/**
* InputStream that computes a checksum of the data being read using a
* supplied Checksum object.
*
* @see Checksum
*
* @author Tom Tromey
* @date May 17, 1999
*/
public class CheckedInputStream extends InputStream
{
protected InputStream in;
/**
* Creates a new CheckInputStream on top of the supplied OutputStream
* using the supplied Checksum.
*/
public CheckedInputStream (InputStream in, Checksum sum)
{
this.in = in;
this.sum = sum;
}
/**
* Returns the Checksum object used. To get the data checksum computed so
* far call <code>getChecksum.getValue()</code>.
*/
public Checksum getChecksum ()
{
return sum;
}
/**
* Reads one byte, updates the checksum and returns the read byte
* (or -1 when the end of file was reached).
*/
public int read () throws IOException
{
int x = in.read();
if (x != -1)
sum.update(x);
return x;
}
/**
* Reads at most len bytes in the supplied buffer and updates the checksum
* with it. Returns the number of bytes actually read or -1 when the end
* of file was reached.
*/
public int read (byte[] buf, int off, int len) throws IOException
{
int r = in.read(buf, off, len);
if (r != -1)
sum.update(buf, off, r);
return r;
}
/**
* Skips n bytes by reading them in a temporary buffer and updating the
* the checksum with that buffer. Returns the actual number of bytes skiped
* which can be less then requested when the end of file is reached.
*/
public long skip (long n) throws IOException
{
if (n == 0)
return 0;
int min = (int) Math.min(n, 1024);
byte[] buf = new byte[min];
long s = 0;
while (n > 0)
{
int r = in.read(buf, 0, min);
if (r == -1)
break;
n -= r;
s += r;
min = (int) Math.min(n, 1024);
sum.update(buf, 0, r);
}
return s;
}
/** The checksum object. */
private Checksum sum;
}

View File

@ -0,0 +1,103 @@
/* CheckedOutputStream.java - Compute checksum of data being written.
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
//package java.util.zip;
package com.classpath.zip;
//import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.OutputStream;
/* Written using on-line Java Platform 1.2 API Specification
* and JCL book.
* Believed complete and correct.
*/
/**
* OutputStream that computes a checksum of data being written using a
* supplied Checksum object.
*
* @see Checksum
*
* @author Tom Tromey
* @date May 17, 1999
*/
public class CheckedOutputStream extends OutputStream
{
protected OutputStream out;
/**
* Creates a new CheckInputStream on top of the supplied OutputStream
* using the supplied Checksum.
*/
public CheckedOutputStream (OutputStream out, Checksum cksum)
{
this.out = out;
this.sum = cksum;
}
/**
* Returns the Checksum object used. To get the data checksum computed so
* far call <code>getChecksum.getValue()</code>.
*/
public Checksum getChecksum ()
{
return sum;
}
/**
* Writes one byte to the OutputStream and updates the Checksum.
*/
public void write (int bval) throws IOException
{
out.write(bval);
sum.update(bval);
}
/**
* Writes the byte array to the OutputStream and updates the Checksum.
*/
public void write (byte[] buf, int off, int len) throws IOException
{
out.write(buf, off, len);
sum.update(buf, off, len);
}
/** The checksum object. */
private Checksum sum;
}

View File

@ -0,0 +1,87 @@
/* Checksum.java - Interface to compute a data checksum
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
//package java.util.zip;
package com.classpath.zip;
/*
* Written using on-line Java Platform 1.2 API Specification, as well
* as "The Java Class Libraries", 2nd edition (Addison-Wesley, 1998).
* Status: Believed complete and correct.
*/
/**
* Interface to compute a data checksum used by checked input/output streams.
* A data checksum can be updated by one byte or with a byte array. After each
* update the value of the current checksum can be returned by calling
* <code>getValue</code>. The complete checksum object can also be reset
* so it can be used again with new data.
*
* @see CheckedInputStream
* @see CheckedOutputStream
*
* @author Per Bothner
* @author Jochen Hoenicke
*/
public interface Checksum
{
/**
* Returns the data checksum computed so far.
*/
long getValue ();
/**
* Resets the data checksum as if no update was ever called.
*/
void reset ();
/**
* Adds one byte to the data checksum.
*
* @param bval the data value to add. The high byte of the int is ignored.
*/
void update (int bval);
/**
* Adds the byte array to the data checksum.
*
* @param buf the buffer which contains the data
* @param off the offset in the buffer where the data starts
* @param len the length of the data
*/
void update (byte[] buf, int off, int len);
}

Some files were not shown because too many files have changed in this diff Show More