aboutsummaryrefslogtreecommitdiff
path: root/src/com/wilko/jaim/FLAPFrameFactory.java
diff options
context:
space:
mode:
authorFrankie B <git@diskfloppy.me>2024-05-10 00:32:34 +0100
committerFrankie B <git@diskfloppy.me>2024-05-10 00:32:34 +0100
commit3faced7068a8401b57be8949e80ce4f4da4a0fb5 (patch)
tree32e76b06780fe6c14ddb4917d3ad0b222fa9c596 /src/com/wilko/jaim/FLAPFrameFactory.java
parenta1dff2cb8d33b17bc5981f1638cd50266713e98f (diff)
Format all code, add editorconfig
Diffstat (limited to 'src/com/wilko/jaim/FLAPFrameFactory.java')
-rw-r--r--src/com/wilko/jaim/FLAPFrameFactory.java33
1 files changed, 16 insertions, 17 deletions
diff --git a/src/com/wilko/jaim/FLAPFrameFactory.java b/src/com/wilko/jaim/FLAPFrameFactory.java
index 475f1d5..4df9fac 100644
--- a/src/com/wilko/jaim/FLAPFrameFactory.java
+++ b/src/com/wilko/jaim/FLAPFrameFactory.java
@@ -1,4 +1,4 @@
-/*
+/*
* (C) 2002 Paul Wilkinson wilko@users.sourceforge.net
*
* This program is free software; you can redistribute it and/or modify
@@ -26,44 +26,43 @@
package com.wilko.jaim;
/**
- *
- * @author paulw
+ * @author paulw
* @version $Revision: 1.3 $
*/
public abstract class FLAPFrameFactory {
- /** Creates new FLAPFrameFactory */
+ /**
+ * Creates new FLAPFrameFactory
+ */
public FLAPFrameFactory() {
}
public static FLAPFrame createFLAPFrame(byte[] frameData) throws FLAPFrameException {
- FLAPFrame f=null;
- if (frameData[0]!='*')
- {
+ FLAPFrame f = null;
+ if (frameData[0] != '*') {
throw new FLAPFrameException("Frame does not start with '*'");
}
-
- switch (frameData[1])
- {
+
+ switch (frameData[1]) {
case FLAPFrame.FLAP_FRAME_SIGNON:
- f=new FLAPSignonFrame(frameData);
+ f = new FLAPSignonFrame(frameData);
break;
case FLAPFrame.FLAP_FRAME_DATA:
- f=new FLAPDataFrame(frameData);
+ f = new FLAPDataFrame(frameData);
break;
case FLAPFrame.FLAP_FRAME_ERROR:
- f=new FLAPErrorFrame(frameData);
+ f = new FLAPErrorFrame(frameData);
break;
case FLAPFrame.FLAP_FRAME_SIGNOFF:
- f=new FLAPSignoffFrame(frameData);
+ f = new FLAPSignoffFrame(frameData);
break;
case FLAPFrame.FLAP_FRAME_KEEP_ALIVE:
- f=new FLAPKeepAliveFrame(frameData);
+ f = new FLAPKeepAliveFrame(frameData);
break;
default:
- throw new FLAPFrameException("Illegal FLAP Frame type: "+Integer.toString(frameData[1]));
+ throw new FLAPFrameException("Illegal FLAP Frame type: " + Integer.toString(frameData[1]));
}
- return(f);
+ return (f);
}
}