Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/exceptions')
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/exceptions/CharConversionErrorWithDetail.java43
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/exceptions/MalformedInputExceptionWithDetail.java103
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/exceptions/MalformedOutputExceptionWithDetail.java44
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/exceptions/UnsupportedCharsetExceptionWithDetail.java47
4 files changed, 0 insertions, 237 deletions
diff --git a/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/exceptions/CharConversionErrorWithDetail.java b/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/exceptions/CharConversionErrorWithDetail.java
deleted file mode 100644
index 8d5253c172..0000000000
--- a/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/exceptions/CharConversionErrorWithDetail.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.sse.core.internal.exceptions;
-
-import java.nio.charset.CharacterCodingException;
-
-
-public class CharConversionErrorWithDetail extends CharacterCodingException {
- /**
- * Comment for <code>serialVersionUID</code>
- */
- private static final long serialVersionUID = 1L;
- private String fCharsetName;
-
- public CharConversionErrorWithDetail() {
- super();
- }
-
- /**
- * @param s
- */
- public CharConversionErrorWithDetail(String charsetName) {
- super();
- fCharsetName = charsetName;
- }
-
- /**
- * @return Returns the fCharsetName.
- */
- public String getCharsetName() {
- return fCharsetName;
- }
-}
diff --git a/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/exceptions/MalformedInputExceptionWithDetail.java b/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/exceptions/MalformedInputExceptionWithDetail.java
deleted file mode 100644
index 629567d8b3..0000000000
--- a/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/exceptions/MalformedInputExceptionWithDetail.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.sse.core.internal.exceptions;
-
-import java.nio.charset.CharacterCodingException;
-
-
-/**
- * Intended to be a more precise form of the MalformedInputException, where
- * character position and attempted encoding can be attempted.
- */
-public class MalformedInputExceptionWithDetail extends CharacterCodingException {
-
- /**
- * Default <code>serialVersionUID</code>
- */
- private static final long serialVersionUID = 1L;
- private int fCharPosition;
- private String fDetectedCharsetName;
- private boolean fExceededMax = false;
- private String fJavaCharsetName;
- private int fMaxBuffer;
-
- /**
- * Disallow default constructor. If attemptedEncoding and charPostion can
- * not be provided, use one of java's MalformedException.
- */
- protected MalformedInputExceptionWithDetail() {
- // Nothing to do
- }
-
- public MalformedInputExceptionWithDetail(String encodingName, int charPostion) {
- this.fJavaCharsetName = encodingName;
- this.fDetectedCharsetName = encodingName;
- this.fCharPosition = charPostion;
- }
-
- public MalformedInputExceptionWithDetail(String attemptedJavaEncoding, String attemptedIANAEncoding, int charPostion) {
- this.fJavaCharsetName = attemptedJavaEncoding;
- this.fDetectedCharsetName = attemptedIANAEncoding;
- this.fCharPosition = charPostion;
- }
-
- /**
- * If charPosition = -1 this could be because the character position
- * exceeded the maximum buffer size, maxBuffer, then exceededMax = true.
- */
- public MalformedInputExceptionWithDetail(String attemptedJavaEncoding, String attemptedIANAEncoding, int charPostion, boolean exceededMax, int maxBuffer) {
- this.fJavaCharsetName = attemptedJavaEncoding;
- this.fDetectedCharsetName = attemptedIANAEncoding;
- this.fCharPosition = charPostion;
- this.fExceededMax = exceededMax;
- this.fMaxBuffer = maxBuffer;
- }
-
- /**
- */
- public java.lang.String getAttemptedIANAEncoding() {
- return fDetectedCharsetName;
- }
-
- /**
- */
- public java.lang.String getAttemptedJavaEncoding() {
- return fJavaCharsetName;
- }
-
- /**
- * @return int
- */
- public int getCharPosition() {
- return fCharPosition;
- }
-
- /**
- * Returns the maxBuffer.
- *
- * @return int
- */
- public int getMaxBuffer() {
- return fMaxBuffer;
- }
-
- /**
- * Returns the exceededMax.
- *
- * @return boolean
- */
- public boolean isExceededMax() {
- return fExceededMax;
- }
-
-}
diff --git a/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/exceptions/MalformedOutputExceptionWithDetail.java b/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/exceptions/MalformedOutputExceptionWithDetail.java
deleted file mode 100644
index 6cf9f7c05f..0000000000
--- a/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/exceptions/MalformedOutputExceptionWithDetail.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.sse.core.internal.exceptions;
-
-
-public class MalformedOutputExceptionWithDetail extends MalformedInputExceptionWithDetail {
-
- /**
- * Default <code>serialVersionUID</code>
- */
- private static final long serialVersionUID = 1L;
-
- /**
- * Disallow default constructor. If attemptedEncoding and charPostion can
- * not be provided, use sun.io.MalformedException.
- */
- private MalformedOutputExceptionWithDetail() {
- // default constructor is disallowed, since if
- // extra info can not be provided, the regular
- // Malformed exception should be thrown
- }
-
- /**
- * Constructor for MalformedOutputExceptionWithDetail.
- *
- * @param attemptedJavaEncoding
- * @param attemptedIANAEncoding
- * @param charPostion
- */
- public MalformedOutputExceptionWithDetail(String attemptedJavaEncoding, String attemptedIANAEncoding, int charPostion) {
- super(attemptedJavaEncoding, attemptedIANAEncoding, charPostion);
- }
-
-}
diff --git a/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/exceptions/UnsupportedCharsetExceptionWithDetail.java b/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/exceptions/UnsupportedCharsetExceptionWithDetail.java
deleted file mode 100644
index 7cdc40b5e6..0000000000
--- a/bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/exceptions/UnsupportedCharsetExceptionWithDetail.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.wst.sse.core.internal.exceptions;
-
-import java.nio.charset.UnsupportedCharsetException;
-
-import org.eclipse.wst.sse.core.internal.encoding.EncodingMemento;
-
-
-/**
- * This is intended for same purpose as it super class, but simply provides
- * more information about than the name in error. This is especially useful
- * for "UIs" which can present users with the error, and the
- * "appropriateDefault" that can be used for a particular input.
- */
-public class UnsupportedCharsetExceptionWithDetail extends UnsupportedCharsetException {
-
- /**
- * Default <code>serialVersionUID</code>
- */
- private static final long serialVersionUID = 1L;
- private EncodingMemento fEncodingMementio;
-
- public UnsupportedCharsetExceptionWithDetail(EncodingMemento encodingMemento) {
- this(encodingMemento.getDetectedCharsetName());
- fEncodingMementio = encodingMemento;
- }
-
- protected UnsupportedCharsetExceptionWithDetail(String charsetName) {
- super(charsetName);
- }
-
- public EncodingMemento getEncodingMemento() {
- return fEncodingMementio;
- }
-
-}

Back to the top