Logo

Navigation
  • Home
  • Services
    • ERP Solutions
    • Implementation Solutions
    • Support and Maintenance Solutions
    • Custom Solutions
    • Upgrade Solutions
    • Training and Mentoring
    • Web Solutions
    • Production Support
    • Architecture Designing
    • Independent Validation and Testing Services
    • Infrastructure Management
  • Expertise
    • Microsoft Development Expertise
    • Mobile Development
    • SQL Server Database and BI
    • SAP BI, SAP Hana, SAP BO
    • Oracle and BI
    • Oracle RAC
  • Technical Training
    • Learn Data Management
      • Business Intelligence
      • Data Mining
      • Data Modeling
      • Data Warehousing
      • Disaster Recovery
    • Learn Concepts
      • Application Development
      • Client Server
      • Cloud Computing Tutorials
      • Cluster Computing
      • CRM Tutorial
      • EDI Tutorials
      • ERP Tutorials
      • NLP
      • OOPS
      • Concepts
      • SOA Tutorial
      • Supply Chain
      • Technology Trends
      • UML
      • Virtualization
      • Web 2.0
    • Learn Java
      • JavaScript Tutorial
      • JSP Tutorials
      • J2EE
    • Learn Microsoft
      • MSAS
      • ASP.NET
      • ASP.NET 2.0
      • C Sharp
      • MS Project Training
      • Silverlight
      • SQL Server 2005
      • VB.NET 2005
    • Learn Networking
      • Networking
      • Wireless
    • Learn Oracle
      • Oracle 10g
      • PL/SQL
      • Oracle 11g Tutorials
      • Oracle 9i
      • Oracle Apps
    • Learn Programming
      • Ajax Tutorial
      • C Language
      • C++ Tutorials
      • CSS Tutorial
      • CSS3 Tutorial
      • JavaScript Tutorial
      • jQuery Tutorial
      • MainFrame
      • PHP Tutorial
      • VBScript Tutorial
      • XML Tutorial
    • Learn Software Testing
      • Software Testing Types
      • SQA
      • Testing
  • Career Training
    • Career Improvement
      • Career Articles
      • Certification Articles
      • Conflict Management
      • Core Skills
      • Decision Making
      • Entrepreneurship
      • Goal Setting
      • Life Skills
      • Performance Development
      • Personal Excellence
      • Personality Development
      • Problem Solving
      • Relationship Management
      • Self Confidence
      • Self Supervision
      • Social Networking
      • Strategic Planning
      • Time Management
    • Education Help
      • Career Tracks
      • Essay Writing
      • Internship Tips
      • Online Education
      • Scholarships
      • Student Loans
    • Managerial Skills
      • Business Communication
      • Business Networking
      • Facilitator Skills
      • Managing Change
      • Marketing Management
      • Meeting Management
      • Process Management
      • Project Management
      • Project Management Life Cycle
      • Project Management Process
      • Project Risk Management
      • Relationship Management
      • Task Management
      • Team Building
      • Virtual Team Management
    • Essential Life Skills
      • Anger Management
      • Anxiety Management
      • Attitude Development
      • Coaching and Mentoring
      • Emotional Intelligence
      • Stress Management
      • Positive Thinking
    • Communication Skills
      • Conversation Skills
      • Cross Culture Competence
      • English Vocabulary
      • Listening Skills
      • Public Speaking Skills
      • Questioning Skills
    • Soft Skills
      • Assertive Skills
      • Influence Skills
      • Leadership Skills
      • Memory Skills
      • People Skills
      • Presentation Skills
    • Finding a Job
      • Etiquette Tips
      • Group Discussions
      • HR Interviews
      • Interview Notes
      • Job Search Tips
      • Resume Tips
      • Sample Resumes
 

A Java TOC2 Class Which Can Contact Aim

By Exforsys | on July 12, 2006 |
J2EE

How To Produce a Java TOC2 Class Which Can Contact Aim

AOL Instant Messenger is one of the most popular instant messenging tools available today. It allows you to send instant messages to other people who use AIM. At the same time, it is possible to heavily customize AIM programs by using a protocol which is named TOC2.

AOL has released an API that people can use to connect to it. In this article I will teach you a method for designing your own chat program using TOC2.

There are a number of reasons why you should want to combine AIM with a computer program. While it is possible to generate your own chat program, the real benefit lies in creating programs that you can chat with like you would with a live person. For example, if you want to get information about your servers, you could use this program to ask your server to provide you with information. There are other impressive things you can do with instant messaging programs. To effectively use the chat network offered by AOL, you will need to use a protocol which is known as TOC. AOL recently updated TOC into TOC2. Even though the update only produced a small number of changes, the update destroyed the connection to the older protocol.

Because of this, many people thought that AOL had decided to stop the use of third party programs on their network. However, AOL didn’t do this, and it is not necessary for third party developers to upgrade their existing software to TOC2. Some programmers learned this the hard way. They would write a basic Java class that would connect to AIM through TOC, and their class would suddenly break. If you want to use TOC, you can start by using the API units that come with Java. These packets will have to be traded with the server. These packets are named FLAPs, and they contain a bit of ASCII text that will give information about the TOC command that you want to use.

The FLAP packets are simple, and use a basic format. The communications with the TOC server will need to come in the form of FLAPs. The twin packets that are sent to you by the TOC server must be in the form of FLAPs as well. The FLAP will come in the form of 6 bytes, and these are Byte 0, Byte 1, Bytes 2 and 3, Bytes 4 and 5, and Byte 6-. Bytes 2 and 3 are connected and Bytes 4 and 5 are connected as well. These two pairs are named words. The words will always be transferred as special numbers. To write a word, you will need to use a specific technique.

Each FLAP will begin with the "*"symbol. The sequence of number will be added next. The length of the characters will be transferred as well. All FLAP packets will be transferred this way with the exception of the signon. The flap signon will be transferred with the sendFlapSignon technique. The reason for this is because the signon packet utilizes a different format. A getFlap technique will also be given. This technique will allow a FLAP packet to be read from a distant computer and will return a line of characters that will hold the information within that packet. The code below will give you can example of this:

protected String getFlap()
throws IOException
{
if ( is.read()!=’*’ )
return null;
is.read();
is.read();
is.read();
int length = (is.read()*0x100)+is.read();
byte b[] = new byte[length];
is.read(b);

This technique will read a FLAP packet, and as you can see, the "*" must be used. The others fields are basically ignored. The length is important because it allows the correct number of characters to be read. It is possible for you to create connections with the TOC server to send and receive messages from it. There are two types of servers you will deal with, and these are the login server and the TOC server. The TOC server can be found at toc.oscar.aol.com. It is port 9898. The login server can be found at login.oscar.aol.com, and is port 5190.

« « TSR in C – An Introduction
Quickly Develop Java Programs With Tapestry » »

Author Description

Avatar

Editorial Team at Exforsys is a team of IT Consulting and Training team led by Chandra Vennapoosa.

Free Training

RSSSubscribe 401 Followers
  • Popular
  • Recent
  • Future of Java Technology

    November 26, 2005 - 0 Comment
  • Antipatterns In Java Programs

    July 1, 2006 - 0 Comment
  • Java Overview

    July 17, 2006 - 0 Comment
  • Is Ejb really significant in enterprise applications?

    November 26, 2005 - 0 Comment
  • How a Profiler Can Improve Your Java Applications

    July 1, 2006 - 0 Comment
  • Java Virtual Machine

    July 13, 2006 - 0 Comment
  • Java for Stand-Alone Applications

    November 26, 2005 - 0 Comment
  • How Code Reviews and PMD Can Crush Bugs In Your Code

    July 3, 2006 - 0 Comment
  • What You Can Do To Deal With Java’s Memory Retention Problems

    July 22, 2006 - 0 Comment
  • Keep it Simple And Secure with Java

    December 2, 2005 - 0 Comment
  • Why It is Important To Focus On Java Exceptions For Your Programs

    July 27, 2006 - 0 Comment
  • Important Features of Java – Multithreading, AWT

    July 26, 2006 - 0 Comment
  • What You Should Know About Java XML

    July 25, 2006 - 0 Comment
  • What You Can Do To Deal With Java’s Memory Retention Problems

    July 22, 2006 - 0 Comment
  • Java Overview

    July 17, 2006 - 0 Comment
  • How To Use Java DB as Your Client Mobile Database

    July 14, 2006 - 0 Comment
  • How To Run J2ME Programs on Palm Devices

    July 14, 2006 - 0 Comment
  • Java Virtual Machine

    July 13, 2006 - 0 Comment
  • Quickly Develop Java Programs With Tapestry

    July 12, 2006 - 0 Comment
  • How To Perform Class Loading With Java

    July 8, 2006 - 0 Comment

Exforsys e-Newsletter

ebook
 

Related Articles

  • Why It is Important To Focus On Java Exceptions For Your Programs
  • Important Features of Java – Multithreading, AWT
  • What You Should Know About Java XML
  • What You Can Do To Deal With Java’s Memory Retention Problems
  • Java Overview

Latest Articles

  • Project Management Techniques
  • Product Development Best Practices
  • Importance of Quality Data Management
  • How to Maximize Quality Assurance
  • Utilizing Effective Quality Assurance Strategies
  • Sitemap
  • Privacy Policy
  • DMCA
  • Trademark Information
  • Contact Us
© 2022. All Rights Reserved.IT Training and Consulting
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.Accept Reject Read More
Privacy & Cookies Policy
Necessary Always Enabled