Skip to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Serializable Item / ItemDefinition

Featured Replies

Can classes such as Item or ItemDefinition please be made Serializable?

 

This would make it easier to save equipment/item choices locally, rather than going by names or IDs.

Could be done in either way:

 

- Item and classes alike implement Serializable directly

- The Identifiable interface extends Serializable, such that Item and other classes inherits it from here.

An already declared serialVersionUID would be nice as well

  • Author

Use a properties file, it's much easier and serialization is unneeded.

 

I usually do property files, but having tried both Serializing and using Property files, I prefer Serializing

 

EDIT: But seeing as how this won't be implemented, atleast not anytime soon, I reckon I'll have to use property files again :E. If it all must be converted to primitive types anyway, the purpose of serializing somewhat fades

 

EDIT2: I retract that previous edit.. Looking into Properties a bit more, its implementation seem simply retarded. It extends Hashtable<Object, Object> leaving full access to the put/get methods of Hashtable, while utilizing these for anything but String will break it since it only supports String. Using properties to store multiple kinds of data structures is a losing battle, having to convert even primitive types into Strings and back.. I'll be going with Serializing after all

Edited by FrostBug

  • 2 months later...

serializing objects is not meant for storage (long-term). rather it's supposed to be used to send and receive objects through and from streams (like sending something to a server) because if you save an object to a file like that it can become corrupted easily. i would agree that using java.util.Properties is not ideal for most situations, so instead you could write an xml parser which would be the best route, or you could use java.util.prefs.Preferences which is a step up from Properties

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.