JANUM (Java and Azureus Netspace Usage Monitor)

JANUM will work on ANY operating system and it will work for any Netspace plan, it even takes datablocks into account. JANUM requires Java 1.4 or later.

 

There are 2 different ways of running JANUM:

See plugin.html for details of running it as an Azureus plugin

The other way of running JANUM is as a standalone usage meter.

 

Standalone Usage Meter

- There are 3 files included in the zip file:

1. JANUM_x.xx.jar - The actual program/plugin, opening (double click in most operating systems) this will run the standalone usage monitor

2. janum.bat - This is a batch file that does exactly the same thing as opening the first file except it is designed for command line execution (not all operating systems have a GUI). Use this if opening the jar file doesn't work

3. readme.html - Basically this readme

- All options will be saved automatically

- Username and password need to be entered before it will automatically update, find them on the options tab

- The timer for the auto update feature will be reset every time a key is pressed in the options field, even if the key isn't a number. It will also be reset when the update button is pressed

- The comparison tab will display the comparison information for all users on all plans. It will include information from every date included in the comparison page. It will provide a filter for different usage meters. The date will be reset to the latest date available whenever the information is updated. Total users refers to the total number of users on all plans for the given usage meter and date

- The option to dowload all comparisons is used to choose between downloading all comparison data available and just todays. By only downloading todays comparisons, you will improve speed considerably. This option is recommended if you don't care about the comparison information for previous days

- The option to save usage divider location will result in the divider between the usage statistics and the daily usage table remembering it's location between program runs. With this option turned off JANUM will set the divider to the middle of the 2 every time it is updated. This will allow users to customize the display to show stats or daily usage with the desired sizes

- The last 7 days is highlighted in the daily usage table. This will highlight the last 7 days usage even when the table order has been reversed

- Selecting the exit option for the system tray will exit the system tray, not JANUM. This is provided in case JANUM doesn't exit properly which will cause the tray icon to keep runnning (it is unlikely that JANUM will not exit properly unless you kill it in an inappropriate manner). Clicking on the tray icon will restore JANUM, minimising JANUM will minimise it to the system tray if the tray is currently running. If the tray is not running (which it won't on non-windows systems) then JANUM will minimise normally (ie. to the taskbar or similar). It is not recommended that you exit the system tray while JANUM is still running as this is only provided in case of an unexpected crash

- Automatic updating works as follows (without deleting old versions):

PLUGIN:

- Every time the plugin is first initialised (so when you start Azureus) it will check for new updates.

- When a new update is found it will display a download progress window.

- This new version will be installed for you and will start being used as soon as Azureus restarts (it won't make you restart so you can continue using the old version for as long as you want).

- The new version is downloaded in the background so in theory it won't impact on other functionality of the plugin or Azureus. Since this only happens when starting Azureus it is very unlikely that you will be downloading anything at a speed fast enough for this to impact on and it doesn't take too long to finish downloading it anyway.

- It will only check at startup and never any other time.

USAGE METER:

- Will check for new updates and download them when first started.

- Downloading happens in the background but it will display the progress in a dialog window. The fact that this happens in the background means that JANUM will keep working properly at the same time but bear in mind that you are downloading something so it will use bandwidth.

- It will also check for updates whenever the Check for updates button is clicked and automatically download any. When using the button to check for updates it will alert you when there aren't any as well (the checking at startup only tells you when it has downloaded an update).

- Doesn't ask you to restart but does rewrite janum.bat to point to the new version. All versions from now on will make janum.bat point to them when ran so if you run an old version it will overwrite janum.bat (unless it is a version prior to 1.43).

 

Change Log

Version 1.46

- Modified auto updates so that you can't attempt to update while it is already updating (it allowed you to download updates several times before it had finished the first attempt)

- Completely redesigned the status bar and progress bars to combine the 2. This basically means that the status bar actually is a progress bar as well. This change makes the status bar look a little different but it is for the better. As a result of doing this I am now happy that the progress bar has found a home and I no longer need to worry about it

- Auto updates will now include a percentage indicator

Version 1.45

- Modified the comparison code to automatically download yesterdays comparisons when there is no data for today. This pretty much eliminates the need for downloading all comparisons unless you want to look at the history of it (which I do hence why it is still there).

- The comparison page has been modified to use the Content-Length header which means it no longer uses chunked encoding. JANUM has been modified to take advantage of this by providing a progress meter (should be a little faster as well but not by much)

- Fixed a problem that resulted in a delay after downloading Content-Length pages, they will now be much faster, this affects the comparison information and automatic updates

- Removed some code from the WebClient class that would actually never be used yet still took processing time

- Modified the auto update system so that both the usage meter and plugin work the same. Removed the ability to resize the progress window. If the progress window is closed downloading will still continue

- Added a download progress bar for the updates. Due to a lack of imagination I added this to the button toolbar, might be moved if I can find a better place to put it later. It will basically jump from 0 to 100% for the xml feed and usage page since their size can't be determined. The comparison page will actually show the progress although I have noticed that it tends to download so damned fast you can't really tell. If you really want to test this try downloading all comparisons, that one takes a while

Version 1.44

- Modified the update download system so that instead of alerting you when it is done it actually displays the progress. This change is only for the usage meter. If you close the progress window it will not stop the download

Version 1.43

- Added the version number to the plugin title, this is designed so that users can figure out what version they are running

- Modified AccessFile class to handle file access using binary and text mode (windows only, other operating systems only have 1 mode for both). This was needed for automatic updates to work

- Modified the WebClient download code to download in bytes rather than a string which allows for binary data to be downloaded

- Fixed a couple of rare occurring bugs that could result in a null pointer exception when failing to download the usage page

- ADDED AUTOMATIC UPDATES. This is a huge change and it will be improved gradually over the next few releases (it works but how the information about available updates etc. is passed on to the user could be improved). The actual checking for updates is extremely quick and doesn't have an impact on speed or performance at all (takes like less than a second even when shaped and downloading something). This system never deletes old versions. There are 2 systems as described above

Version 1.42

- Added a ListenerAdapter class. This will improve event handling somewhat however it is not yet completely utilised, future versions will make more use of this

- Changed all threads used by JANUM to minimum priority, this will improve system resource usage although by how much is system dependant

- Implemented a SplitTabbedPane object. This will control the interface for the usage meter. At current it doesn't do anything that the previous interface didn't already do but it will allow me to add interface customisations in the future. There are plans for this in future releases but they aren't finished yet

- Moved the update button to the top of the window and added it to a ToolBar. This will allow updating from any tab not just the usage tab. This was done mainly due to planned interface changes. If you take note this ToolBar can be moved wherever you want it, it will not however save its location

- Removed the ability to run JANUM as a console application, it was only used by the plugin anyway and now it should run a little smoother

- Modified the WebClient to use the Java cacerts file directly. This will solve problems that could occur when Java couldn't find this file. There is now a necessity that the cacerts file exist in the [JRE install location]/lib/security/ directory, there is no reason why Java won't contain this file at that location anyway but in the event that it doesn't JANUM will not work properly. If JANUM fails because it can't find this file let me know as it is fixable (it will give errors related to SSL handshaking)

- Modified the plugin to no longer display the network status and shaping status when using hard limits, this required downloading more than was necessary

- Completely redesigned the plugin download code so that everything is done internally (yay been trying to pull this off ever since JANUM 0.1). The plugin will no longer need to run a separate Java process to download the data. This system will mean that the speed improvements for the usage page that didn't apply to the plugin will now apply making it a lot faster. It will no longer need to wait for the other process to execute making it faster. It no longer needs to download 2 pages for unlimited users, ever. Since there isn't a separate process running every update, system resources will be vastly improved (and that's an understatement). The plugin should now have next to no impact on performance at all

Version 1.41

- Changed the internal structure of the classes for JANUM. This makes everything a little more independent and actually makes a tad more sense, users probably won't notice nor will they care

- Added free traffic for flat rate users

- Fixed an issue preventing the usage table from displaying when using xml feed version 0

- Modified the code behind the daily usage table, it is now better although no real speed improvements

- Fixed a bug that prevented the storing of the divider location from working properly

- Moved MemoryManager.exe and Tray.exe to be internal to the jar file. This allows these files to be created at runtime when they don't exist and also provides the opportunity to add support for multiple operating systems to use the system tray icon (requires the executable for each operating system to actually be created first so it still only works for windows)

- Updated the download library with the latest version, this contains a little more functionality as well as bug fixes. Bugs fixed include:

Fixed a bug that caused incorrect average remaining downloads

Fixed a bug that prevented the news from being downloaded when using earlier versions of the xml feed

Fixed a bug that prevented comparisons from working properly for flat rate users

Modified the download code so that it can now recognise when the comparison page fails to download (previous versions didn't register a failure properly)

Version 1.40

- Implemented backwards compatibility for password decryption. New versions will encrypt using the new system but are capable of decrypting old passwords as well. This is provided so that users upgrading will not need to re-enter their passwords and at some point in the future this will probably be removed (will wait several versions until everyone has had enough time to upgrade to the new encryption system)

- Modified the Normal network status colour to make it a little easier on the eyes (bright green isn't the nicest thing to look at on some monitors). I now use the colour as specified on the usage page for shaping status although the colour may not match the usage page perfectly (Java and html may treat colours differently)

- Use a different system for storing the information between updates. This allows the details displayed to remain in memory until new details are available. This will make updating more smooth (there won't be a small period of time when no data is available like there used to be). As a result of this any modifications to the GUI while updating the information will not cause problems (needed for some possible future changes that I have planned)

- Algorithmic changes for some of the data parsing algorithms in the download library, this ensures more problem free calculations without affecting accuracy. There is a speed improvement but it will be in milliseconds so nobody will notice it

Version 1.39

- Added redundancy for when the xml feed is empty

- Fixed a bug that resulted in the usage page never loading once an invalid cookie was saved. Since the cookie saved from previous versions would be considered invalid on the first run, this was a problem that would probably affect everyone

Version 1.38

- Completely replaced the old downloading and parsing system with a library based system. This basically means that downloading and parsing data is completely independent from the rest of JANUM. This will allow for much easier and more powerful changes to occur. There are a few things this library can do that aren't used yet but I will slowly add these features in future releases

- Removed GetUsage.java as the new library system completely replaced it. UsageMonitor.java is now the main class. This basically makes starting JANUM far less complicated.

- Replaced the password encryption method. At current the new encryption method is pretty hopeless and anyone with half a brain could crack it, they wouldn't even need a computer. The encryption will be improved over time but it was necessary to replace it as the old way had issues. Nearly everyone will have to re-enter their password (sorry, couldn't be helped)

- Implemented source conversion so that JANUM will handle the data based on the ascii format for the operating system in question. This means that anyone saving xml feeds to a file will be able to do it properly

- Replaced the rather complicated way used to calculate the appropriate new line character with an extremely easy one that works better

- Renamed the plugin to JANUM Plugin rather than Netspace Plugin as that name came from the time before JANUM had a name

- Re-coded the comparison tab for the usage meter. Although it will work the same it should be faster, especially when changing the filtering (ie. plan type etc.)

- Replaced the comparison page redundancy system. You will now need to update twice if the url changes, this is a side effect of separating the download code but it isn't a huge deal

- The plugin and usage meter are now completely separated as is the new download system. This will allow me to modify one part without it affecting the others in a negative way. It will also mean that any changes to the download code will affect both the plugin and usage meter equally (except for the improved speed for the usage page, that doesn't really work for the plugin)

- Fixed the news feed bug that displayed some ampersands as &

- Completely re-coded quite a lot. There is the slight chance of new bugs creeping in as a result of this but I did test as much as possible and all looks good so far. There are still parts that may get re-coded later, these won't affect what you see but will result in minor improvements.

- The plugin is almost completely self sufficient. This saves from having to do things twice and allows it to use the new download library to it's full extent. It still needs to execute the usage meter as a separate process while downloading as Azureus seems to block SSL connections when doing it inside the plugin. This means that the plugin handles all the processing needed internally thus reducing the chance of screwing it up while changing something else. Efficiency has also been improved however the speed improvements for downloading the usage page don't work for it (still slightly faster than it used to be but the usage meter is faster)

Version 1.37

- Fixed a bug that prevented the downloading of the comparison information when the url location redundancy system was used (the compare.url file didn't exist or pointed to the wrong url). There is no longer a need to update twice to get the comparison information

- Enhanced certain features of the web client system adding the ability to access cookies returned from pages and the headers for the last page downloaded. This was necessary  for other new features to work

- Automatically saves the config data on exiting JANUM. This will not happen in OS X as it ignores the closing event. On other operating systems it will remove the ability to corrupt the config data if you close JANUM while it is saving (this is extremely unlikely to ever happen anyway but I'm thorough)

- Improved the download speed for the my.netspace usage page. I don't know exactly how fast this will be but it will skip the 3 level redirect steps that used to be required, should be noticeably faster. If you fiddle with your config.dat file or if you don't use JANUM for an entire month this system will need to download the usage page the old way again, but only once. In the event that the data needed for this to work doesn't exist or is not correct, it will automatically acquire it again. JANUM is now the fastest usage meter available (until someone rips my idea off). There are other benefits to this but they aren't that important (ie. they aren't benefits to the users). This improvement doesn't affect the plugin users just the standalone usage meter.

Version 1.36

- Implemented password encryption for both the usage meter and the Azureus plugin. This encryption system is designed for Java 1.4 and later. Although it is possible to get it working on earlier versions, it requires a seperate install and it would be easier to just update. This encryption is relatively secure but possible to reverse and as such securing your config.dat file is still recommended, this just adds an extra layer of protection. You shouldn't need to re-enter your password and encryption will kick in automatically.

Version 1.35

- Replaced the Java import system with class importing rather than package importing. The only real effect of this is guaranteed compatability with future versions of Java

- The debugging window will be a little more useful now as it only updates when it has to rather than once every second

- Significantly reduced hard disk access by only saving the options when they change rather than all the time

- Replaced the new download system with my own web client class. This class now handles all the "ugly stuff" relating to downloading pages. This web client class has eliminated several bugs the old way had (these bugs didn't affect acquiring the information, they just weren't the proper way of handling HTTP). The source code is also much easier to understand (except the web client class).This system is now more object oriented by design which is the way Java applications should be. This will fix the bug where xml feeds weren't saved properly but will save them in the format the server uses which may cause strange new line character recognition in windows (not a bug, windows treats new lines differently to most other operating systems and to avoid this problem just use wordpad). By now using chunk based downloading there will be an increase in efficiency

Version 1.34

- Now automatically determines the comparison page url whenever a download of the comparison page fails. There is no guarantee that a failure is because of the page being moved but it will assume that. Whenever the page fails to download it will attempt to download it twice (after it has gotten the new url) and as such it may be slower. If the comparison page is fine and you have the current url then efficiency will be at its maximum

- Added an option to choose between all comparison data and just todays. By just downloading todays, speed will be increased drastically

- Removed the include GNUM data option as it is no longer needed, the server handles this part automatically

Version 1.33

- Implemented a comparison page redundancy system. This will save the comparison page url to a compare.url file. If that file doesn't exist it will look up the URL. If usage comparisons don't work due to the page being moved then you will need to delete the compare.url file in order for it to find the new location

Version 1.32

- Hopefully fixed the options not saving problem by moving the saving code into a thread rather than the window closing event

- Combined a couple of different threads into one. This should make up for the additional processing used to save the options now

Version 1.31

- Minor readjustment of code that may have prevented a couple of options from working when the debugging system failed

Version 1.30

- Completely modified the download code. This will allow support in earlier versions of Java but I wouldn't recommend using anything earlier than 1.4 as earlier versions will require a lot of fiddling around to get it to work properly. I tried to get this working with Java 1.2 and gave up after several hours (something about a certificate authentication problem), so basically it would be much easier to just upgrade to Java 1.4

- In downloading the pages differently I have accomplished a minor speed improvement (and my code is about 100 times harder to follow)

Version 1.29

- Major compatibility changes designed to support the earliest Java versions possible (Java 1.2). Although source support is provided as far back as Java 1.2, external restrictions placed on JANUM will require Java 1.4 or later to run JANUM properly. There is no way to work around these restrictions for the plugin and the only workaround for the standalone usage meter requires completely coding everything necessary to connect to a web page from scratch

- Changed some of the update and layout code for compatibility purposes in such a way that will improve the overall performance of JANUM anyway

- Added what is called a Hash class. This class replaces the preferences system that was used to store the options in earlier versions. This class provides full compatibility across versions while providing a more robust means of storing data. It will use a config.dat file to store the data and will load the data from this file as well. This has 2 issues that it introduces:

1. All previously stored data will be lost so users will need to set up their options again

2. The password is saved in plain text (encryption is planned in the future) and as a result it is the responsibility of the user to ensure the security of the config.dat file.

Version 1.28

- Improved the system tray functionality for windows users. The icon will now disappear when JANUM exits and a couple of minor bugs relating to the system tray have been fixed

Version 1.27

- Added functionality for a system tray icon (or notification area icon as it is more properly called). This icon doesn't display any information but is a means of minimising JANUM to the system tray. This will only work on windows systems and probably only with .NET installed (haven't tried it without .NET, you might get lucky). There is a known bug where the icon may not disappear when JANUM exits and I don't think there is a way around that

Version 1.26

- Modified several scroll bars used throughout the standalone usage meter to scroll faster under windows configurations. This may cause them to scroll too fast under other operating systems in which case let me know and I will implement a conditional setting

- Changed the usage tab to include a dragable divider between the usage stats and the daily usage table

- Modified the usage table to highlight the last 7 days usage

Version 1.25

- Added automatic display refreshing between usage information downloading and comparison information downloading which will now show the usage details while still downloading the comparison details

- Added a news tab. The default size isn't really big enough to see all the news without scrolling so either resizing the window or maximising it while you read the news is recommended. This is due to the way Netspace designs the news layout and I didn't want to forcibly change that layout

- Automatically orders the news properly (the XML feed doesn't contain them in the correct order)

Version 1.24

- Removed a bug where plugin users would end up downloading the comparison page as well (not needed for the plugin). Now the plugin should be faster

- Removed a bug where auto timed updates where never fired

- Added the ability to turn updating of GNUM comparisons off. This will result in faster comparison downloads but will not update comparisons from other usage meters using GNUM 

Version 1.23

- Modified the comparison page to use output version 2 which is more efficient (less to download)

Version 1.22

- Modified the comparison tab layout significantly

- Redesigned the comparison calculations to be compatible with the new layout system

- Improved comparison calculation efficiency in places (might have made it worse in others so it probably balances out)

- Added additonal information to the comparison tab

- Comparison information will now work for flat rate users, so JANUM once again functions properly for everyone, everywhere.

- The comparison information is compatible with future comparison page updates to a certain degree. There shouldn't be any need to get the latest version to take advantage of new updates to the comparison page (to a degree)

Version 1.21

- Added a comparison tab to the standalone

Version 1.20

- Removed the added execution alternative from 1.19

- Fixed a bug relating to the folder locations of Azureus and JANUM, will now work regardless of any installation paths

Version 1.19

- Attempted to fix a bug by creating an alternative execution method that is used when the first fails, this proved unsuccessful

Version 1.18

- Improved some execution code used to aquire the download data

- Included the usage comparison uploading

Version 1.17

- Added a debug option to the plugin to allow determining the cause of any errors more accurately. Also provides a little more information

Version 1.16

- Fixed a Java version compatibility bug

Version 1.15

- Fixed a bug that can cause a serious crash in windows with certain security settings

Version 1.14

- Major changes to the standalone interface layout, now more useful

- Added the ability for the standalone to remember the window size (so you can customise it)

- Replaced the batch file system with a new one (less files needed)

- Added a debugging window to the standalone for more detailed (but complicated) error messages

Version 1.13

- Saves the xml feed to files for later reference

- Restructured some of the program code, probably not noticable

Version 1.12

- Now uses data from the usage page to replace data from the xml feed. This data is more accurate and allows the xml feed to be down without making a major impact

- Changed the last 7 days calculations to make them as accurate as possible. Will now remain accurate all the time (other usage meters can display only partial data when a new billing cycle starts)

Version 1.11

- Incorporated part of the new usage page last 7 days downloads as this remains accurate during new billing cycle transitions

- Significant improvements in error messages

- Status bar now displays what is being downloaded

- Added a 20 second timeout for downloading pages

- Fixed some "Why on earth did I put that there?" bugs

Version 1.10

- Finally does work with the new usage page (took a few versions)

Version 1.09

- Another failed attempt at fully incorporating the new usage page

Version 1.08

- Another failed attempt at fully incorporating the new usage page

Version 1.07

- Failed attempt at fully incorporating the new usage page

Version 1.06

- 1.05 changed handling of the xml feed, this one fixes a bug that was introduced during that process

Version 1.05

- Should now try to solve download errors automatically if possible

- Reworked the status bar a little bit

- Added additional averages to the standalone

- Improvements in code that probably won't be noticable

Version 1.04

- Improved usage of the new usage page

Version 1.03

- Improved usage of the new usage page

Version 1.02

- First attempt at using the new usage page

Version 1.01

- JANUM will now continue to work when a usage page is not online

- Improved the memory manager error handling

Version 1.00

- First official version

- Added auto timed updates

- Added the ability to select the order of the daily usage table

- Fixed the ability to run memory management several times simultaneously

Version 0.90

- Fixes excessive processor usage in the standalone

- Includes a memory usage management feature for windows

- Fixed an infinite loop problem for invalid passwords (probably didn't exist in earlier versions though)

- Slight changes to error messages

- Other minor bug fixes

- Added the ability for unlimited users to use hard limits (a previously flat rate feature)

- Improved password masking

Version 0.80

- Basic password masking for the plugin has been implemented

Version 0.70

- Added a staus bar for displaying download messages

- Incorporated multithreading, this allows the application to function properly while downloading

- Added version number to the title

Version 0.61

- Added rounding for download averages

- Won't attempt to download anything when the username or password is empty

Version 0.60

- Fixed a bug that would have prevented averages from being calculated properly during leap years

- Added some things to the standalone

- Significant efficiency improvements for flat rate users (doesn't require input, will automatically determine your plan)

Version 0.52

- Included additional batch files to run it as a standalone on alternative operating systems

Version 0.51

- Added a title to the standalone window (I forgot that in 0.50)

- Added the missing line of code that allows proper password saving for standalone (I forgot that in 0.50 too)

Version 0.50

- Now works as a standalone usage meter as well, run using the provided batch files

Version 0.42

- Fixed a major bug that prevented it from working on non-windows operating systems

Version 0.41

- Fixes a couple of minor bugs that may have resulted in using invalid data if a download failed

- Now works for datablocks (previous versions would have given really weird results if you had purchased datablocks)

Version 0.4

- Fixed a couple of flat rate plan issues

- Changed the status messages for flat rate users

Version 0.3

- Now works for falt rate plans

Version 0.2

- Added an option to disable the plugin

Version 0.1

- Works as a plugin for unlimited users

- Username and password can be set via options

- Time between updates can be set via options

- Speeds can be set via options

- Log designed to record success and failure at downloading data

- Status bar designed to display basic speed information